text stringlengths 8 4.13M |
|---|
#![feature(btree_retain)]
#[macro_use]
extern crate log;
pub mod beatcount;
pub mod timestamp;
pub mod utils;
use std::{
collections::BTreeMap,
net::{SocketAddr, UdpSocket},
sync::{Arc, RwLock},
thread,
time::Duration,
};
use rand::{seq::IteratorRandom, thread_rng};
use serde::{Deserialize, Serialize};
use beatcount::BeatCount;
use utils::get_timestamp;
pub type Port = u16;
pub const SWEEP_TIME: i64 = 5;
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub struct MembershipList(pub BTreeMap<Port, BeatCount>, pub Option<Port>);
impl MembershipList {
pub fn new(members: BTreeMap<Port, BeatCount>, port: Option<Port>) -> Self {
Self(members, port)
}
pub fn get_random(&self) -> Vec<Port> {
let mut rng = thread_rng();
self.0
.iter()
.filter(|(k, _)| self.1.map_or(true, |p| p != **k))
.choose_multiple(&mut rng, 2)
.iter()
.map(|kv| *kv.0)
.collect()
}
pub fn merge(&mut self, members: &MembershipList, member: SocketAddr) {
for (port, BeatCount(count, time)) in &members.0 {
match self.0.get_mut(port) {
Some(ref mut beatcount) => {
if *count > beatcount.get_count() {
beatcount.0 = *count;
beatcount.just_touch();
}
if member.port() == *port {
beatcount.increment_and_touch();
}
}
None => {
if (get_timestamp() - time.get_timestamp()) < SWEEP_TIME {
info!("New node: {}", *port);
self.0
.insert(*port, BeatCount::from((*count, time.get_timestamp())));
info!("Memberlist: {:?}", self);
} else {
info!(
"Tried to add expired node: {:?} from: {:?}",
port,
member.port()
);
}
}
}
}
self.sweep();
}
pub fn sweep(&mut self) {
let member_port = self.1.clone();
self.0.retain(|port, bc| {
if (get_timestamp() - bc.get_timestamp()) > SWEEP_TIME
&& member_port.map_or(true, |p| p != *port)
{
warn!("Removing {:?} - {:?}", port, bc);
return false;
}
return true;
});
}
}
impl From<(BTreeMap<Port, BeatCount>, Option<Port>)> for MembershipList {
fn from(members_port: (BTreeMap<Port, BeatCount>, Option<Port>)) -> Self {
Self::new(members_port.0, members_port.1)
}
}
impl From<(&[Port], Option<Port>)> for MembershipList {
fn from(members_port: (&[Port], Option<Port>)) -> Self {
MembershipList::from((
members_port
.0
.iter()
.map(|p| (*p, BeatCount::new()))
.collect::<BTreeMap<Port, BeatCount>>(),
members_port.1,
))
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub enum Message {
MemList(MembershipList),
Data(String),
Error(String),
}
pub fn transmit_membership_list(node: &UdpSocket, membership_list: &MembershipList, to_node: Port) {
let data = Message::MemList((*membership_list).clone());
let membership_list_encoded: Vec<u8> = bincode::serialize(&data).unwrap();
node.send_to(&membership_list_encoded, format!("localhost:{}", to_node))
.unwrap();
}
pub fn receive_membership_list(node: UdpSocket) -> (Message, Option<SocketAddr>) {
let mut buf = [0u8; 1024];
node.set_read_timeout(Some(Duration::from_secs(1))).unwrap();
match node.recv_from(&mut buf) {
Ok((_amt, src_addr)) => {
let message: Message = bincode::deserialize(&buf).unwrap();
// info!("Received from {:?} and data is {:?}", src_addr, message);
(message, Some(src_addr))
}
Err(err) => (Message::Error(format!("Error: {:?}", err)), None),
}
}
pub fn transmitter_thread(
socket: &UdpSocket,
membership_list: &Arc<RwLock<MembershipList>>,
sleep_interval: Duration,
) {
thread::sleep(sleep_interval);
let to_nodes = membership_list.read().unwrap().get_random();
for to_node in &to_nodes {
let membership_list = membership_list.clone();
transmit_membership_list(&socket, &membership_list.read().unwrap(), *to_node);
}
}
pub fn process_message(
message: Message,
membership_list: Arc<RwLock<MembershipList>>,
src_addr: Option<SocketAddr>,
) {
match message {
Message::MemList(members) => {
// info!("Got members: {:?}", members);
membership_list
.write()
.unwrap()
.merge(&members, src_addr.unwrap())
}
Message::Data(string) => info!("{}", string),
Message::Error(err) => debug!("{}", err),
}
}
|
use core::panic;
use std::cmp::{PartialOrd, Ordering};
pub(crate) enum Tree<T:PartialOrd> {
Node {
value: T,
left: Box<Tree<T>>,
right: Box<Tree<T>>,
},
Empty
}
impl<T:PartialOrd + Copy> Tree<T> {
#[allow(unused)]
pub fn new() -> Self{
Tree::Empty
}
pub fn create(val: T) -> Self {
assert_ne!(val.partial_cmp(&val), None, "Provided value in create cant be NAN!");
Tree::Node{
value: val,
left: Box::new(Tree::Empty),
right: Box::new(Tree::Empty),
}
}
#[allow(unused)]
pub fn insert(&mut self, val: T) {
match self {
Tree::Node {
ref value,
ref mut left,
ref mut right,
} => match val.partial_cmp(value) {
Some(Ordering::Less) => left.insert(val),
Some(Ordering::Greater) => right.insert(val),
Some(Ordering::Equal) => return,
None => panic!("Value provided in insert cant be NAN!"),
},
Tree::Empty => {
*self = Tree::create(val);
}
}
}
pub fn find(&mut self, val: T) -> bool {
match self {
Tree::Node {
ref value,
ref mut left,
ref mut right,
} => match val.partial_cmp(value) {
Some(Ordering::Less) => left.find(val),
Some(Ordering::Greater) => right.find(val),
Some(Ordering::Equal) => return true,
None => panic!("Value provided in find cant be NAN!"),
},
Tree::Empty => return false,
}
}
// Helper function is needed in order to prevent values that dont exist
// at the root returning valid ancestors
fn lca_internal(&mut self, val1: T, val2: T) -> T {
match self {
Tree::Node {
value,
ref mut left,
ref mut right,
} => {
if left.find(val1) {
if left.find(val2) {
return left.lca_internal(val1, val2);
} else {return *value}
} else if left.find(val2) {
if left.find(val1) {
return left.lca_internal(val1, val2);
} else {return *value}
} else if right.find(val1) {
if right.find(val2) {
return right.lca_internal(val1, val2);
} else {return *value}
} else if right.find(val2) {
if right.find(val1) {
return right.lca_internal(val1, val2);
} else {return *value}
} else {panic!("the values arent in the tree!")}
},
Tree::Empty => panic!("encountered empty node!"),
}
}
#[allow(unused)]
pub fn lca(&mut self, val1: T, val2: T) -> T {
assert!(self.find(val1), "val1 not found in tree");
assert!(self.find(val2), "val2 not found in tree");
return self.lca_internal(val1, val2);
}
} |
// Copyright 2019 The n-sql Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[macro_use]
mod common;
test_init!();
#[theory]
#[case("a in ('x', 'y', 'z')" , NSQL, "a in ('x', 'y', 'z')")]
#[case("a in (1, 3, 5)" , NSQL,"a in (1, 3, 5)")]
#[case("a in ('2')" , NSQL,"a in ('2')")]
#[case("a in (select name from student)" , NSQL,"a in (select name from student)")]
#[case("a not in ('x', 'y', 'z')" , NSQL, "a not in ('x', 'y', 'z')")]
fn test(left: &str, database_type: DatabaseType, right: &str){
test_predicate(database_type, left, right)
}
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-compare-mode-nll
// Check that `&mut` objects cannot be borrowed twice, just like
// other `&mut` pointers.
trait Foo {
fn f1(&mut self) -> &();
fn f2(&mut self);
}
fn test(x: &mut Foo) {
let _y = x.f1();
x.f2(); //~ ERROR cannot borrow `*x` as mutable
}
fn main() {}
|
use std::error::Error;
use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_void};
use std::ptr::null_mut;
use crate::{get_turbo_ratio_limits, set_turbo_ratio_limits};
use crate::structures::TurboRatioLimits;
use crate::util::ToPtr;
use std::borrow::Borrow;
#[repr(C)]
pub struct Result {
pub ok: *mut c_void,
pub err: *mut c_char,
}
#[no_mangle]
pub extern fn ffi_get_turbo_ratio_limits() -> *mut Result {
match get_turbo_ratio_limits() {
Ok(turbo_ratio_limits) => {
Result {
ok: turbo_ratio_limits.into_ptr() as *mut c_void,
err: null_mut(),
}.into_ptr()
}
Err(err) => {
Result {
ok: null_mut(),
err: CString::new(err.to_string()).unwrap().into_raw(),
}.into_ptr()
}
}
}
#[no_mangle]
pub unsafe extern fn ffi_set_turbo_ratio_limits(ptr: *mut TurboRatioLimits) {
assert!(!ptr.is_null());
set_turbo_ratio_limits(ptr.as_ref().unwrap());
}
|
use proptest::prop_assert_eq;
use proptest::strategy::{Just, Strategy};
use crate::erlang::byte_size_1::result;
use crate::test::strategy;
#[test]
fn without_bitstring_errors_badarg() {
crate::test::without_bitstring_errors_badarg(file!(), result);
}
#[test]
fn with_heap_binary_is_byte_count() {
run!(
|arc_process| {
(Just(arc_process.clone()), strategy::byte_vec()).prop_map(|(arc_process, byte_vec)| {
(
arc_process.clone(),
byte_vec.len(),
arc_process.binary_from_bytes(&byte_vec),
)
})
},
|(arc_process, byte_count, bitstring)| {
prop_assert_eq!(
result(&arc_process, bitstring),
Ok(arc_process.integer(byte_count))
);
Ok(())
},
);
}
#[test]
fn with_subbinary_without_bit_count_is_byte_count() {
run!(
|arc_process| {
(Just(arc_process.clone()), strategy::byte_vec()).prop_flat_map(
|(arc_process, byte_vec)| {
(
Just(arc_process.clone()),
Just(byte_vec.len()),
strategy::term::binary::sub::containing_bytes(
byte_vec,
arc_process.clone(),
),
)
},
)
},
|(arc_process, byte_count, bitstring)| {
prop_assert_eq!(
result(&arc_process, bitstring),
Ok(arc_process.integer(byte_count))
);
Ok(())
},
);
}
#[test]
fn with_subbinary_with_bit_count_is_byte_count_plus_one() {
run!(
|arc_process| {
(
Just(arc_process.clone()),
strategy::term::binary::sub::byte_count(),
)
.prop_flat_map(|(arc_process, byte_count)| {
(
Just(arc_process.clone()),
Just(byte_count),
strategy::term::binary::sub::with_size_range(
strategy::term::binary::sub::byte_offset(),
strategy::term::binary::sub::bit_offset(),
(byte_count..=byte_count).boxed(),
(1_u8..=7_u8).boxed(),
arc_process.clone(),
),
)
})
},
|(arc_process, byte_count, bitstring)| {
prop_assert_eq!(
result(&arc_process, bitstring),
Ok(arc_process.integer(byte_count + 1))
);
Ok(())
},
);
}
|
use self::models::{NewPost, Post};
#[macro_use]
extern crate diesel;
extern crate dotenv;
use diesel::pg::PgConnection;
use diesel::prelude::*;
use dotenv::dotenv;
use std::env;
pub mod models;
pub mod schema;
pub fn establish_connection() -> PgConnection {
dotenv().ok();
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
PgConnection::establish(&database_url).expect(&format!("Error connecting to {}", database_url))
}
pub fn create_flavor<'a>(
conn: &PgConnection,
name: &'a str,
description: &'a str,
) -> models::Flavor {
let new_flavor = models::NewFlavor { name, description };
diesel::insert_into(schema::flavors::table)
.values(&new_flavor)
.get_result(conn)
.expect("Error saving new flavor")
}
pub fn create_post<'a>(conn: &PgConnection, title: &'a str, body: &'a str) -> Post {
use schema::posts;
let new_post = NewPost { title, body };
diesel::insert_into(posts::table)
.values(&new_post)
.get_result(conn)
.expect("Error saving new post")
}
|
use klt;
use std::ptr;
use std::os::raw;
use std::ffi::CString;
const REPLACE: bool = false;
pub unsafe fn unsafe_main() {
let n_features = 150;
let n_frames = 10;
let tc = klt::KLTCreateTrackingContext();
let fl = klt::KLTCreateFeatureList(n_features);
let ft = klt::KLTCreateFeatureTable(n_frames, n_features);
let tcr = &mut *tc;
tcr.sequential_mode = true as klt::Bool;
tcr.write_internal_images = false as klt::Bool;
tcr.affine_consistency_check = -1;
let mut ncols = 0;
let mut nrows = 0;
let img1 = klt::pgmReadFile(s!("img0.pgm"), ptr::null_mut(), &mut ncols, &mut nrows);
let mut img2 = Vec::<raw::c_uchar>::with_capacity((nrows * ncols) as usize);
klt::KLTSelectGoodFeatures(tc, img1, ncols, nrows, fl);
klt::KLTStoreFeatureList(fl, ft, 0);
klt::KLTWriteFeatureListToPPM(fl, img1, ncols, nrows, s!("feat0.ppm"));
let mut fnamein;
let mut fnameout;
for i in 1..n_frames {
fnamein = CString::new(format!("img{}.pgm", i)).unwrap();
klt::pgmReadFile(fnamein.as_ptr(), img2.as_mut_ptr(), &mut ncols, &mut nrows);
klt::KLTTrackFeatures(tc, img1, img2.as_ptr(), ncols, nrows, fl);
if REPLACE {
klt::KLTReplaceLostFeatures(tc, img2.as_ptr(), ncols, nrows, fl);
}
klt::KLTStoreFeatureList(fl, ft, i);
fnameout = CString::new(format!("feat{}.ppm", i)).unwrap();
klt::KLTWriteFeatureListToPPM(fl, img2.as_ptr(), ncols, nrows, fnameout.as_ptr());
}
klt::KLTWriteFeatureTable(ft, s!("features.txt"), s!("%5.1f"));
klt::KLTWriteFeatureTable(ft, s!("features.ft"), ptr::null());
klt::KLTFreeFeatureTable(ft);
klt::KLTFreeFeatureList(fl);
klt::KLTFreeTrackingContext(tc);
}
|
// Copyright 2020-2021, The Tremor Team
//
// 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 crate::op::prelude::*;
use std::mem;
use tremor_script::{highlighter, prelude::*, srs, Query};
#[derive(Debug)]
pub struct Script {
pub id: String,
script: srs::ScriptDecl,
}
impl Script {
pub fn with_stmt(id: String, decl: &srs::Stmt, instance: &srs::Stmt) -> Result<Self> {
// We require Value to be static here to enforce the constraint that
// arguments name/value pairs live at least as long as the operator nodes that have
// dependencies on them.
//
// Note also that definitional parameters and instance parameters have slightly
// different costs. The definitional paraemeters ( if not overriden ) never change
// but instance parameters that do override must be guaranteed as static to ensure
// their lifetimes don't go out of scope. We avoid this with definitional arguments
// as they are always available once specified.
//
// The key to why this is the case is the binding lifetime as it is associated with
// the definition ( from which all instances are incarnated ) not the 'create' instances.
// The binding association chooses the definition simply as it hosts the parsed script.
//
let mut script = srs::ScriptDecl::try_new_from_stmt(decl)?;
script.apply_stmt(instance)?;
Ok(Self { id, script })
}
}
impl Operator for Script {
fn on_event(
&mut self,
_uid: u64,
_port: &str,
state: &mut Value<'static>,
mut event: Event,
) -> Result<EventAndInsights> {
let context = EventContext::new(event.ingest_ns, event.origin_uri.as_ref());
let port = event.data.apply_decl(&self.script, |data, decl| {
let (unwind_event, event_meta) = data.parts_mut();
let value = decl.script.run(
&context,
AggrType::Emit,
unwind_event, // event
state, // state
event_meta, // $
);
match value {
Ok(Return::EmitEvent { port }) => Some(port.map_or(OUT, Cow::from)),
Ok(Return::Emit { value, port }) => {
*unwind_event = value;
Some(port.map_or(OUT, Cow::from))
}
Ok(Return::Drop) => None,
Err(e) => {
let s = self
.script
.raw()
.get(0)
.and_then(|v| {
let s: &[u8] = v;
let s = std::str::from_utf8(s).ok()?;
let mut h = highlighter::Dumb::default();
Query::format_error_from_script(s, &mut h, &e).ok()?;
Some(h.to_string())
})
.unwrap_or_default();
let mut o = Value::from(hashmap! {
"error".into() => Value::from(s),
});
mem::swap(&mut o, unwind_event);
if let Some(error) = unwind_event.as_object_mut() {
error.insert("event".into(), o);
};
Some(ERR)
}
}
});
Ok(port.map_or_else(EventAndInsights::default, |port| vec![(port, event)].into()))
}
}
|
// Copyright (c) The Starcoin Core Contributors
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
//! Suppose we have the following data structure in a smart contract:
//!
//! struct B {
//! Map<String, String> mymap;
//! }
//!
//! struct A {
//! B b;
//! int my_int;
//! }
//!
//! struct C {
//! List<int> mylist;
//! }
//!
//! A a;
//! C c;
//!
//! and the data belongs to Alice. Then an access to `a.b.mymap` would be translated to an access
//! to an entry in key-value store whose key is `<Alice>/a/b/mymap`. In the same way, the access to
//! `c.mylist` would need to query `<Alice>/c/mylist`.
//!
//! So an account stores its data in a directory structure, for example:
//! <Alice>/balance: 10
//! <Alice>/a/b/mymap: {"Bob" => "abcd", "Carol" => "efgh"}
//! <Alice>/a/myint: 20
//! <Alice>/c/mylist: [3, 5, 7, 9]
//!
//! If someone needs to query the map above and find out what value associated with "Bob" is,
//! `address` will be set to Alice and `path` will be set to "/a/b/mymap/Bob".
//!
//! On the other hand, if you want to query only <Alice>/a/*, `address` will be set to Alice and
//! `path` will be set to "/a" and use the `get_prefix()` method from statedb
use crate::{
account_address::AccountAddress,
account_config::{ACCOUNT_RESOURCE_PATH, BALANCE_RESOURCE_PATH},
language_storage::{ModuleId, ResourceKey, StructTag},
};
use move_core_types::identifier::{IdentStr, Identifier};
use mirai_annotations::*;
use num_enum::{IntoPrimitive, TryFromPrimitive};
use serde::{Deserialize, Serialize};
use starcoin_crypto::hash::{CryptoHash, HashValue};
use std::{fmt, slice::Iter};
#[derive(Serialize, Deserialize, Debug, PartialEq, Hash, Eq, Clone, Ord, PartialOrd)]
pub struct Field(Identifier);
impl Field {
pub fn new(name: Identifier) -> Field {
Field(name)
}
pub fn name(&self) -> &IdentStr {
&self.0
}
}
impl fmt::Display for Field {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
}
}
#[derive(Eq, Hash, Serialize, Deserialize, Debug, Clone, PartialEq, Ord, PartialOrd)]
pub enum Access {
Field(Field),
Index(u64),
}
impl Access {
pub fn new(name: Identifier) -> Self {
Access::Field(Field::new(name))
}
}
impl fmt::Display for Access {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Access::Field(field) => write!(f, "\"{}\"", field),
Access::Index(i) => write!(f, "{}", i),
}
}
}
/// Non-empty sequence of field accesses
#[derive(Eq, Hash, Serialize, Deserialize, Debug, Clone, PartialEq, Ord, PartialOrd)]
pub struct Accesses(Vec<Access>);
// invariant self.0.len() == 1
/// SEPARATOR is used as a delimiter between fields. It should not be a legal part of any identifier
/// in the language
const SEPARATOR: char = '/';
impl Accesses {
pub fn empty() -> Self {
Accesses(vec![])
}
pub fn new(field: Field) -> Self {
Accesses(vec![Access::Field(field)])
}
/// Add a field to the end of the sequence
pub fn add_field_to_back(&mut self, field: Field) {
self.0.push(Access::Field(field))
}
/// Add an index to the end of the sequence
pub fn add_index_to_back(&mut self, idx: u64) {
self.0.push(Access::Index(idx))
}
pub fn append(&mut self, accesses: &mut Accesses) {
self.0.append(&mut accesses.0)
}
/// Returns the first field in the sequence and reference to the remaining fields
pub fn split_first(&self) -> (&Access, &[Access]) {
self.0.split_first().unwrap()
}
/// Return the last access in the sequence
pub fn last(&self) -> &Access {
assume!(self.0.last().is_some()); // follows from invariant
self.0.last().unwrap() // guaranteed not to fail because sequence is non-empty
}
pub fn iter(&self) -> Iter<'_, Access> {
self.0.iter()
}
pub fn len(&self) -> usize {
self.0.len()
}
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
pub fn as_separated_string(&self) -> String {
let mut path = String::new();
for access in self.0.iter() {
match access {
Access::Field(s) => {
let access_str = s.name().as_str();
assert!(access_str != "");
path.push_str(access_str)
}
Access::Index(i) => path.push_str(i.to_string().as_ref()),
};
path.push(SEPARATOR);
}
path
}
pub fn take_nth(&self, new_len: usize) -> Accesses {
assert!(self.0.len() >= new_len);
Accesses(self.0.clone().into_iter().take(new_len).collect())
}
}
impl<'a> IntoIterator for &'a Accesses {
type Item = &'a Access;
type IntoIter = Iter<'a, Access>;
fn into_iter(self) -> Self::IntoIter {
self.0.iter()
}
}
impl From<Vec<Access>> for Accesses {
fn from(accesses: Vec<Access>) -> Accesses {
Accesses(accesses)
}
}
#[derive(
IntoPrimitive,
TryFromPrimitive,
Clone,
Copy,
Eq,
PartialEq,
Hash,
Serialize,
Deserialize,
Ord,
PartialOrd,
Debug,
)]
#[repr(u8)]
pub enum DataType {
RESOURCE,
CODE,
}
impl DataType {
pub const LENGTH: usize = 2;
pub fn is_code(&self) -> bool {
match self {
DataType::CODE => true,
_ => false,
}
}
pub fn is_resource(&self) -> bool {
match self {
DataType::RESOURCE => true,
_ => false,
}
}
#[inline]
pub fn type_index(&self) -> u8 {
self.clone().into()
}
/// Every DataType has a storage root in AccountState
#[inline]
pub fn storage_index(&self) -> usize {
self.type_index() as usize
}
}
#[derive(Clone, Eq, PartialEq, Hash, Serialize, Deserialize, Ord, PartialOrd, CryptoHash)]
pub struct AccessPath {
address: AccountAddress,
data_type: DataType,
data_hash: HashValue,
}
impl AccessPath {
pub fn new(address: AccountAddress, data_type: DataType, data_hash: HashValue) -> Self {
AccessPath {
address,
data_type,
data_hash,
}
}
pub fn address(&self) -> AccountAddress {
self.address
}
pub fn data_type(&self) -> DataType {
self.data_type
}
pub fn data_hash(&self) -> HashValue {
self.data_hash
}
/// Given an address, returns the corresponding access path that stores the Account resource.
pub fn new_for_account(address: AccountAddress) -> Self {
Self::new(address, DataType::RESOURCE, ACCOUNT_RESOURCE_PATH.clone())
}
/// Given an address, returns the corresponding access path that stores the Balance resource.
pub fn new_for_balance(address: AccountAddress) -> Self {
Self::new(address, DataType::RESOURCE, BALANCE_RESOURCE_PATH.clone())
}
pub fn resource_access_vec(tag: &StructTag) -> HashValue {
tag.crypto_hash()
}
/// Convert Accesses into a byte offset which would be used by the storage layer to resolve
/// where fields are stored.
pub fn resource_access_path(key: &ResourceKey) -> AccessPath {
let path = AccessPath::resource_access_vec(&key.type_());
AccessPath {
address: key.address().to_owned(),
data_type: DataType::RESOURCE,
data_hash: path,
}
}
fn code_access_path_vec(key: &ModuleId) -> HashValue {
key.crypto_hash()
}
pub fn code_access_path(key: &ModuleId) -> AccessPath {
let path = AccessPath::code_access_path_vec(key);
AccessPath {
address: key.address(),
data_type: DataType::CODE,
data_hash: path,
}
}
}
impl fmt::Debug for AccessPath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"AccessPath {{ address: {:x}, type: {:?} path: {} }}",
self.address,
self.data_type,
self.data_hash.to_hex()
)
}
}
impl fmt::Display for AccessPath {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "AccessPath {{ address: {:x}, ", self.address)?;
match &self.data_type {
DataType::RESOURCE => write!(f, "type: Resource, ")?,
DataType::CODE => write!(f, "type: Module, ")?,
};
write!(f, "hash: {:?}, ", self.data_hash.to_hex())?;
// write!(
// f,
// "suffix: {:?} }} ",
// String::from_utf8_lossy(&self.path[1 + HashValue::LENGTH..])
// )
Ok(())
}
}
impl Into<(AccountAddress, DataType, HashValue)> for AccessPath {
fn into(self) -> (AccountAddress, DataType, HashValue) {
(self.address, self.data_type, self.data_hash)
}
}
// libra data tag.
const CODE_TAG: u8 = 0;
const RESOURCE_TAG: u8 = 1;
impl Into<libra_types::access_path::AccessPath> for AccessPath {
fn into(self) -> libra_types::access_path::AccessPath {
let mut path = vec![];
match self.data_type {
DataType::RESOURCE => path.push(RESOURCE_TAG),
DataType::CODE => path.push(CODE_TAG),
}
path.extend(self.data_hash.to_vec());
libra_types::access_path::AccessPath::new(self.address.into(), path)
}
}
impl From<libra_types::access_path::AccessPath> for AccessPath {
fn from(libra_access_path: libra_types::access_path::AccessPath) -> Self {
let path = libra_access_path.path;
let data_type = match path[0] {
RESOURCE_TAG => DataType::RESOURCE,
CODE_TAG => DataType::CODE,
_ => panic!("Unsupported access path."),
};
let hash = HashValue::from_slice(path[1..=HashValue::LENGTH].as_ref())
.expect("access_path must contains HashValue");
Self::new(libra_access_path.address.into(), data_type, hash)
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::account_config;
#[test]
fn test_convert() {
let access_path0 = AccessPath::new(
AccountAddress::random(),
DataType::RESOURCE,
HashValue::random(),
);
let access_path1: libra_types::access_path::AccessPath = access_path0.clone().into();
let access_path2: AccessPath = access_path1.into();
assert_eq!(access_path0, access_path2);
}
#[test]
fn test_convert_with_struct_tag() {
let access_path0 = AccessPath::new_for_account(account_config::association_address());
let access_path1: libra_types::access_path::AccessPath = access_path0.clone().into();
let access_path2: AccessPath = access_path1.clone().into();
assert_eq!(access_path0, access_path2);
let access_path3 = libra_types::access_path::AccessPath::new_for_account(
account_config::association_address().into(),
);
let access_path4: AccessPath = access_path3.clone().into();
let access_path5: libra_types::access_path::AccessPath = access_path4.clone().into();
assert_eq!(access_path3, access_path5);
assert_eq!(access_path0, access_path4);
assert_eq!(access_path1, access_path5);
}
}
|
#[cfg(test)]
mod tests {
extern crate my_torrent_client_project;
use std::io::Read;
use bencode::FromBencode;
pub use my_torrent_client_project::metainfo_files::*;
const file_path: &str = "debian-10.3.0-amd64-netinst.iso.torrent";
#[test]
fn test_open_file() {
let reader = open_file(file_path);
assert!(reader.is_ok());
}
#[test]
fn test_info_dict_from_bencode() {
let test_info = Info {
name: "debian-10.3.0-amd64-netinst.iso".to_string(),
length: 351272960,
piece_length: 262144,
pieces: "torrent".as_bytes().to_vec(),
};
let info = "d6:lengthi351272960e4:name31:debian-10.3.0-amd64-netinst.iso12:piece lengthi262144e6:pieces7:torrente";
let mut buf = info.as_bytes().to_vec();
let bencode: bencode::Bencode = match bencode::from_vec(buf) {
Ok(bc) => bc,
Err(e) => panic!()
};
let result: Info = match FromBencode::from_bencode(&bencode) {
Ok(i) => i,
Err(e) => panic!(e)
};
assert_eq!(result, test_info);
}
#[test]
fn test_torrent_from_bencode() {
let test_torrent = Torrent {
announce: "http://bttracker.debian.org:6969/announce".to_string(),
info: Info {
name: "debian-10.3.0-amd64-netinst.iso".to_string(),
length: 351272960,
piece_length: 262144,
pieces: "torrent".as_bytes().to_vec(),
},
};
let torrent = "d8:announce41:http://bttracker.debian.org:6969/announce4:infod6:lengthi351272960e4:name31:debian-10.3.0-amd64-netinst.iso12:piece lengthi262144e6:pieces7:torrentee";
let mut buf = torrent.as_bytes().to_vec();
let bencode: bencode::Bencode = match bencode::from_vec(buf) {
Ok(bc) => bc,
Err(e) => panic!(e)
};
let result: Torrent = match FromBencode::from_bencode(&bencode) {
Ok(t) => t,
Err(e) => panic!(e)
};
assert_eq!(result, test_torrent);
}
#[test]
fn test_data_from_bencode() {
let mut reader = open_file(file_path).unwrap();
let mut buf = Vec::<u8>::new();
reader.read_to_end(&mut buf);
let bencode: bencode::Bencode = match bencode::from_vec(buf) {
Ok(bc) => bc,
Err(e) => panic!(e)
};
let result: Result<Torrent, TorrentFromBencodeError> = FromBencode::from_bencode(&bencode);
assert!(result.is_ok());
}
#[test]
fn test_split_piece_hashes() {
let input = vec![3u8; 80];
match split_piece_hashes(input) {
Ok(res) => assert_eq!(res.len(), 4);
Err(_) => panic!()
}
}
#[test]
fn test_split_piece_hashes_invalid() {
let input = vec![4u8; 78];
let res = split_piece_hashes(input);
assert!(res.is_err());
}
} |
use std::convert::TryFrom;
use std::fmt;
use std::io;
use std::mem::size_of;
use std::ops::Range;
use std::path::PathBuf;
use byteorder::NetworkEndian;
use bytes::Bytes;
use thiserror::Error;
use zerocopy::byteorder::{U32, U64};
use zerocopy::{FromBytes, LayoutVerified};
use crate::object::{Id, ShortId, ID_LEN};
use crate::parse::Parser;
pub(in crate::object::database::packed) struct IndexFile {
data: Bytes,
version: Version,
count: usize,
}
#[derive(Debug, Error)]
pub(in crate::object::database::packed) enum ReadIndexFileError {
#[error("cannot parse an pack file index with version `{0}`")]
UnknownVersion(u32),
#[error("{0}")]
Other(&'static str),
#[error("io error reading pack file index")]
Io(
#[from]
#[source]
io::Error,
),
}
#[derive(Debug, Error)]
pub(in crate::object::database::packed) enum FindIndexOffsetError {
#[error("the object id was not found in the pack file index")]
NotFound,
#[error("the object id is ambiguous in the pack file index")]
Ambiguous,
#[error(transparent)]
ReadIndexFile(ReadIndexFileError),
}
#[derive(Debug, PartialEq)]
enum Version {
V1,
V2,
}
#[repr(C)]
#[derive(Debug, FromBytes)]
struct EntryV1 {
offset: U32<NetworkEndian>,
id: Id,
}
#[repr(C)]
#[derive(Debug, FromBytes)]
struct EntryV2 {
id: Id,
}
impl IndexFile {
const SIGNATURE: u32 = u32::from_be_bytes(*b"\xfftOc");
const HEADER_LEN: usize = 8;
const FAN_OUT_COUNT: usize = 256;
const FAN_OUT_LEN: usize = IndexFile::FAN_OUT_COUNT * 4;
const ENTRY_LEN_V1: usize = size_of::<EntryV1>();
const ENTRY_LEN_V2: usize = size_of::<EntryV2>();
const TRAILER_LEN: usize = ID_LEN + ID_LEN;
pub fn open(path: PathBuf) -> Result<Self, ReadIndexFileError> {
let bytes = Bytes::from(fs_err::read(path)?);
IndexFile::parse(Parser::new(bytes))
}
fn parse(mut parser: Parser<Bytes>) -> Result<Self, ReadIndexFileError> {
let version = if parser.consume_u32(IndexFile::SIGNATURE) {
let version = parser
.parse_u32()
.map_err(|_| ReadIndexFileError::Other("file is too short"))?;
match version {
2 => Version::V2,
n => return Err(ReadIndexFileError::UnknownVersion(n)),
}
} else {
Version::V1
};
let mut count = 0;
for _ in 0..IndexFile::FAN_OUT_COUNT {
let n = parser
.parse_u32()
.map_err(|_| ReadIndexFileError::Other("file is too short"))?;
if n < count {
return Err(ReadIndexFileError::Other("the fan out is not monotonic"));
}
count = n;
}
let count =
usize::try_from(count).or(Err(ReadIndexFileError::Other("invalid index count")))?;
let mut min_size = count
.checked_mul(version.entry_len())
.ok_or(ReadIndexFileError::Other("invalid index count"))?
.checked_add(IndexFile::TRAILER_LEN)
.ok_or(ReadIndexFileError::Other("invalid index count"))?;
if version == Version::V2 {
min_size = count
.checked_mul(8)
.ok_or(ReadIndexFileError::Other("invalid index count"))?
.checked_add(min_size)
.ok_or(ReadIndexFileError::Other("invalid index count"))?;
}
let max_size = match version {
Version::V1 => min_size,
Version::V2 => min_size
.checked_add(
count
.saturating_sub(1)
.checked_mul(8)
.ok_or(ReadIndexFileError::Other("invalid index count"))?,
)
.ok_or(ReadIndexFileError::Other("invalid index count"))?,
};
if parser.remaining() < min_size || parser.remaining() > max_size {
return Err(ReadIndexFileError::Other(
"index length is an invalid length",
));
}
Ok(IndexFile {
data: parser.into_inner(),
count,
version,
})
}
pub fn find_offset(&self, short_id: &ShortId) -> Result<(u64, Id), FindIndexOffsetError> {
let fan_out = self.fan_out();
let first_byte = short_id.first_byte() as usize;
let index_end = fan_out[first_byte].get() as usize;
let index_start = match first_byte.checked_sub(1) {
Some(prev) => fan_out[prev].get() as usize,
None => 0,
};
fn binary_search<'a, T: Entry>(
entries: &'a [T],
short_id: &ShortId,
) -> Result<(usize, &'a T), FindIndexOffsetError> {
match entries.binary_search_by(|entry| entry.id().cmp_short(short_id)) {
Ok(index) => Ok((index, &entries[index])),
Err(index) => {
let mut matches = entries[index..]
.iter()
.take_while(|entry| entry.id().starts_with(short_id));
let entry = matches
.next()
.ok_or_else(|| FindIndexOffsetError::NotFound)?;
if matches.next().is_some() {
return Err(FindIndexOffsetError::Ambiguous);
}
Ok((index, entry))
}
}
}
let (offset, id) = match self.version {
Version::V1 => {
let (_, entry) = binary_search(self.entries_v1(index_start..index_end)?, short_id)?;
(u64::from(entry.offset.get()), entry.id)
}
Version::V2 => {
let (index, entry) =
binary_search(self.entries_v2(index_start..index_end)?, short_id)?;
let (small_offsets, large_offsets) = self.offsets();
let small_offset = small_offsets[index_start + index].get();
let offset = if (small_offset & 0x80000000) == 0 {
u64::from(small_offsets[index_start + index].get())
} else {
let large_offset_index = usize::try_from(small_offset & 0x7fffffff)
.map_err(|_| FindIndexOffsetError::read_index_file("invalid offset"))?;
large_offsets
.get(large_offset_index)
.ok_or(FindIndexOffsetError::read_index_file("invalid offset"))?
.get()
};
(offset, entry.id)
}
};
Ok((offset, id))
}
pub fn count(&self) -> u32 {
self.count as u32
}
fn fan_out(&self) -> &[U32<NetworkEndian>] {
LayoutVerified::new_slice(&self.data()[..IndexFile::FAN_OUT_LEN])
.unwrap()
.into_slice()
}
fn entries_v1(&self, range: Range<usize>) -> Result<&[EntryV1], FindIndexOffsetError> {
Ok(LayoutVerified::<_, [EntryV1]>::new_slice(self.entries())
.unwrap()
.into_slice()
.get(range)
.ok_or(FindIndexOffsetError::read_index_file("invalid offset"))?)
}
fn entries_v2(&self, range: Range<usize>) -> Result<&[EntryV2], FindIndexOffsetError> {
Ok(LayoutVerified::<_, [EntryV2]>::new_slice(self.entries())
.unwrap()
.into_slice()
.get(range)
.ok_or(FindIndexOffsetError::read_index_file("invalid offset"))?)
}
fn entries(&self) -> &[u8] {
let data = self.data();
&data[IndexFile::FAN_OUT_LEN..][..(self.count * self.version.entry_len())]
}
fn offsets(&self) -> (&[U32<NetworkEndian>], &[U64<NetworkEndian>]) {
debug_assert_eq!(self.version, Version::V2);
let data = &self.data()[IndexFile::FAN_OUT_LEN..];
let start = self.count * (IndexFile::ENTRY_LEN_V2 + 4);
let mid = start + self.count * 4;
let end = data.len() - IndexFile::TRAILER_LEN;
(
LayoutVerified::new_slice(&data[start..mid])
.unwrap()
.into_slice(),
LayoutVerified::new_slice(&data[mid..end])
.unwrap()
.into_slice(),
)
}
fn data(&self) -> &[u8] {
match self.version {
Version::V1 => &self.data,
Version::V2 => &self.data[IndexFile::HEADER_LEN..],
}
}
pub fn id(&self) -> Id {
let pos = self.data.len() - IndexFile::TRAILER_LEN;
Id::from_bytes(&self.data[pos..][..ID_LEN])
}
// TODO: check this
#[allow(unused)]
fn crc(&self) -> Id {
let pos = self.data.len() - IndexFile::TRAILER_LEN + ID_LEN;
Id::from_bytes(&self.data[pos..][..ID_LEN])
}
}
impl Version {
fn entry_len(&self) -> usize {
match self {
Version::V1 => IndexFile::ENTRY_LEN_V1,
Version::V2 => IndexFile::ENTRY_LEN_V2,
}
}
}
trait Entry {
fn id(&self) -> &Id;
}
impl Entry for EntryV1 {
fn id(&self) -> &Id {
&self.id
}
}
impl Entry for EntryV2 {
fn id(&self) -> &Id {
&self.id
}
}
impl fmt::Debug for IndexFile {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("IndexFile")
.field("version", &self.version)
.field("count", &self.count)
.field("id", &self.id())
.finish()
}
}
impl FindIndexOffsetError {
fn read_index_file(message: &'static str) -> Self {
FindIndexOffsetError::ReadIndexFile(ReadIndexFileError::Other(message))
}
}
#[cfg(test)]
mod tests {
use std::mem::{align_of, size_of};
use std::str::FromStr;
use super::*;
#[test]
fn test_entry_layout() {
assert_eq!(size_of::<EntryV1>(), IndexFile::ENTRY_LEN_V1);
assert_eq!(align_of::<EntryV1>(), 1);
assert_eq!(size_of::<EntryV2>(), IndexFile::ENTRY_LEN_V2);
assert_eq!(align_of::<EntryV2>(), 1);
}
fn id(s: &str) -> Id {
Id::from_str(s).unwrap()
}
fn short(s: &str) -> ShortId {
ShortId::from_str(s).unwrap()
}
impl FindIndexOffsetError {
fn is_ambiguous(&self) -> bool {
match self {
FindIndexOffsetError::Ambiguous => true,
_ => false,
}
}
fn is_not_found(&self) -> bool {
match self {
FindIndexOffsetError::NotFound => true,
_ => false,
}
}
}
#[test]
fn parse_v1() {
let mut bytes = Vec::new();
for _ in 0..32 {
bytes.extend(b"\x00\x00\x00\x00");
}
for _ in 32..64 {
bytes.extend(b"\x00\x00\x00\x01");
}
for _ in 64..IndexFile::FAN_OUT_COUNT {
bytes.extend(b"\x00\x00\x00\x03");
}
bytes.extend(b"\x00\x00\x00\x24");
bytes.extend(id("2057bab324290cc76e3669cd24ff7345e907fd13").as_bytes());
bytes.extend(b"\x00\x00\x00\x42");
bytes.extend(id("4046b3b7c67ec0dedab9c5952d630b241eebf820").as_bytes());
bytes.extend(b"\x00\x00\x00\x61");
bytes.extend(id("4046d56282d07200068541199583f49c65f707f7").as_bytes());
bytes.extend(id("ea0e0aa8f197e86ba6d2c2203e280b26ecbadb76").as_bytes());
bytes.extend(Id::default().as_bytes());
let parser = Parser::new(bytes.into());
let index = IndexFile::parse(parser).unwrap();
assert_eq!(index.count, 3);
assert_eq!(index.version, Version::V1);
assert_eq!(
index.find_offset(&short("2057bab324290cc7")).unwrap(),
(0x24, id("2057bab324290cc76e3669cd24ff7345e907fd13"))
);
assert_eq!(
index
.find_offset(&short("2057bab324290cc76e3669cd24ff7345e907fd13"))
.unwrap(),
(0x24, id("2057bab324290cc76e3669cd24ff7345e907fd13"))
);
assert_eq!(
index
.find_offset(&short("4046b3b7c67ec0dedab9c5952d630b241eebf820"))
.unwrap(),
(0x42, id("4046b3b7c67ec0dedab9c5952d630b241eebf820"))
);
assert_eq!(
index
.find_offset(&short("4046d56282d07200068541199583f49c65f707f7"))
.unwrap(),
(0x61, id("4046d56282d07200068541199583f49c65f707f7"))
);
assert!(index
.find_offset(&ShortId::from_str("4046").unwrap())
.unwrap_err()
.is_ambiguous());
assert!(index
.find_offset(&ShortId::from_str("4048").unwrap())
.unwrap_err()
.is_not_found());
}
#[test]
fn parse_v2() {
let mut bytes = Vec::new();
bytes.extend(b"\xff\x74\x4f\x63");
bytes.extend(b"\x00\x00\x00\x02");
for _ in 0..32 {
bytes.extend(b"\x00\x00\x00\x00");
}
for _ in 32..64 {
bytes.extend(b"\x00\x00\x00\x01");
}
for _ in 64..IndexFile::FAN_OUT_COUNT {
bytes.extend(b"\x00\x00\x00\x03");
}
bytes.extend(id("2057bab324290cc76e3669cd24ff7345e907fd13").as_bytes());
bytes.extend(id("4046b3b7c67ec0dedab9c5952d630b241eebf820").as_bytes());
bytes.extend(id("4046d56282d07200068541199583f49c65f707f7").as_bytes());
bytes.extend(b"\x00\x00\x00\x00");
bytes.extend(b"\x00\x00\x00\x00");
bytes.extend(b"\x00\x00\x00\x00");
bytes.extend(b"\x00\x00\x00\x24");
bytes.extend(b"\x80\x00\x00\x00");
bytes.extend(b"\x00\x00\x00\x61");
bytes.extend(b"\x00\x00\x00\x00\x00\x00\x00\x42");
bytes.extend(id("ea0e0aa8f197e86ba6d2c2203e280b26ecbadb76").as_bytes());
bytes.extend(Id::default().as_bytes());
let parser = Parser::new(bytes.into());
let index = IndexFile::parse(parser).unwrap();
assert_eq!(index.count, 3);
assert_eq!(index.version, Version::V2);
assert_eq!(
index.find_offset(&short("2057bab324290cc7")).unwrap(),
(0x24, id("2057bab324290cc76e3669cd24ff7345e907fd13"))
);
assert_eq!(
index
.find_offset(&short("2057bab324290cc76e3669cd24ff7345e907fd13"))
.unwrap(),
(0x24, id("2057bab324290cc76e3669cd24ff7345e907fd13"))
);
assert_eq!(
index
.find_offset(&short("4046b3b7c67ec0dedab9c5952d630b241eebf820"))
.unwrap(),
(0x42, id("4046b3b7c67ec0dedab9c5952d630b241eebf820"))
);
assert_eq!(
index
.find_offset(&short("4046d56282d07200068541199583f49c65f707f7"))
.unwrap(),
(0x61, id("4046d56282d07200068541199583f49c65f707f7"))
);
assert!(index
.find_offset(&ShortId::from_str("4046").unwrap())
.unwrap_err()
.is_ambiguous());
assert!(index
.find_offset(&ShortId::from_str("4048").unwrap())
.unwrap_err()
.is_not_found());
}
}
|
pub struct Config {
pub map_size: Vec<u32>,
pub player_number: u32,
pub starting_money: u32,
pub starting_nodes: u32, // per Player
pub starting_distance: u32,
pub starting_boarder_distance: u32,
pub starting_execs: u32 // per Player
}
impl Config {
pub fn new(map_size: Vec<u32>, player_number: u32, starting_money: u32, starting_nodes: u32, starting_distance: u32, starting_boarder_distance: u32, starting_execs: u32) -> Config {
Config {
map_size,
player_number,
starting_money,
starting_nodes,
starting_distance,
starting_boarder_distance,
starting_execs
}
}
/// Will at some point read out a config file
pub fn read_config() -> Config {
Config::new(vec![16,16], 4, 1000000, 1, 2, 2, 2)
}
pub fn map_size(&self, dim: &str) -> usize {
if dim == "x" {
return self.map_size[1] as usize;
} else if dim == "y" {
return self.map_size[0] as usize;
} else {
panic!();
}
}
pub fn starting_execs(&self) -> u32 {
self.starting_execs*self.player_number
}
} |
use coordinate_compression::CoordinateCompression;
use fenwick_tree::FenwickTree;
use input_i_scanner::InputIScanner;
use std::iter::FromIterator;
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 n = scan!(usize);
let a = scan!(u32; n);
let b = scan!(u32; n);
let com_a = CoordinateCompression::from_iter(a.iter().copied());
let com_b = CoordinateCompression::from_iter(b.iter().copied());
let mut bs = vec![vec![]; com_a.size()];
for i in 0..n {
bs[com_a.find_index(&a[i])].push(com_b.find_index(&b[i]));
}
for i in 0..bs.len() {
bs[i].sort();
bs[i].reverse();
}
let mut tree = FenwickTree::new(com_b.size(), 0usize);
let mut ans = 0;
for bs in bs {
let mut j = 0;
while j < bs.len() {
let mut dup = 1;
while j + 1< bs.len() && bs[j] == bs[j + 1] {
j += 1;
dup += 1;
}
tree.add(bs[j], dup);
ans += dup * tree.sum(bs[j]..com_b.size());
j += 1;
}
}
println!("{}", ans);
}
|
use std::borrow::Cow;
use std::str::FromStr;
use crate::encode::{to_string_repr, StringStyle};
use crate::parser;
use crate::parser::key::is_unquoted_char;
use crate::repr::{Decor, Repr};
use crate::InternalString;
/// Key as part of a Key/Value Pair or a table header.
///
/// # Examples
///
/// ```notrust
/// [dependencies."nom"]
/// version = "5.0"
/// 'literal key' = "nonsense"
/// "basic string key" = 42
/// ```
///
/// There are 3 types of keys:
///
/// 1. Bare keys (`version` and `dependencies`)
///
/// 2. Basic quoted keys (`"basic string key"` and `"nom"`)
///
/// 3. Literal quoted keys (`'literal key'`)
///
/// For details see [toml spec](https://github.com/toml-lang/toml/#keyvalue-pair).
///
/// To parse a key use `FromStr` trait implementation: `"string".parse::<Key>()`.
#[derive(Debug)]
pub struct Key {
key: InternalString,
pub(crate) repr: Option<Repr>,
pub(crate) decor: Decor,
}
impl Key {
/// Create a new table key
pub fn new(key: impl Into<InternalString>) -> Self {
Self {
key: key.into(),
repr: None,
decor: Default::default(),
}
}
/// Parse a TOML key expression
///
/// Unlike `"".parse<Key>()`, this supports dotted keys.
pub fn parse(repr: &str) -> Result<Vec<Self>, crate::TomlError> {
Self::try_parse_path(repr)
}
pub(crate) fn with_repr_unchecked(mut self, repr: Repr) -> Self {
self.repr = Some(repr);
self
}
/// While creating the `Key`, add `Decor` to it
pub fn with_decor(mut self, decor: Decor) -> Self {
self.decor = decor;
self
}
/// Access a mutable proxy for the `Key`.
pub fn as_mut(&mut self) -> KeyMut<'_> {
KeyMut { key: self }
}
/// Returns the parsed key value.
pub fn get(&self) -> &str {
&self.key
}
pub(crate) fn get_internal(&self) -> &InternalString {
&self.key
}
/// Returns key raw representation, if available.
pub fn as_repr(&self) -> Option<&Repr> {
self.repr.as_ref()
}
/// Returns the default raw representation.
pub fn default_repr(&self) -> Repr {
to_key_repr(&self.key)
}
/// Returns a raw representation.
pub fn display_repr(&self) -> Cow<'_, str> {
self.as_repr()
.and_then(|r| r.as_raw().as_str())
.map(Cow::Borrowed)
.unwrap_or_else(|| {
Cow::Owned(self.default_repr().as_raw().as_str().unwrap().to_owned())
})
}
/// Returns the surrounding whitespace
pub fn decor_mut(&mut self) -> &mut Decor {
&mut self.decor
}
/// Returns the surrounding whitespace
pub fn decor(&self) -> &Decor {
&self.decor
}
/// Returns the location within the original document
#[cfg(feature = "serde")]
pub(crate) fn span(&self) -> Option<std::ops::Range<usize>> {
self.repr.as_ref().and_then(|r| r.span())
}
pub(crate) fn despan(&mut self, input: &str) {
self.decor.despan(input);
if let Some(repr) = &mut self.repr {
repr.despan(input)
}
}
/// Auto formats the key.
pub fn fmt(&mut self) {
self.repr = Some(to_key_repr(&self.key));
self.decor.clear();
}
fn try_parse_simple(s: &str) -> Result<Key, crate::TomlError> {
let mut key = parser::parse_key(s)?;
key.despan(s);
Ok(key)
}
fn try_parse_path(s: &str) -> Result<Vec<Key>, crate::TomlError> {
let mut keys = parser::parse_key_path(s)?;
for key in &mut keys {
key.despan(s);
}
Ok(keys)
}
}
impl Clone for Key {
#[inline(never)]
fn clone(&self) -> Self {
Self {
key: self.key.clone(),
repr: self.repr.clone(),
decor: self.decor.clone(),
}
}
}
impl std::ops::Deref for Key {
type Target = str;
fn deref(&self) -> &Self::Target {
self.get()
}
}
impl std::hash::Hash for Key {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.get().hash(state);
}
}
impl Ord for Key {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.get().cmp(other.get())
}
}
impl PartialOrd for Key {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}
impl Eq for Key {}
impl PartialEq for Key {
#[inline]
fn eq(&self, other: &Key) -> bool {
PartialEq::eq(self.get(), other.get())
}
}
impl PartialEq<str> for Key {
#[inline]
fn eq(&self, other: &str) -> bool {
PartialEq::eq(self.get(), other)
}
}
impl<'s> PartialEq<&'s str> for Key {
#[inline]
fn eq(&self, other: &&str) -> bool {
PartialEq::eq(self.get(), *other)
}
}
impl PartialEq<String> for Key {
#[inline]
fn eq(&self, other: &String) -> bool {
PartialEq::eq(self.get(), other.as_str())
}
}
impl std::fmt::Display for Key {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
crate::encode::Encode::encode(self, f, None, ("", ""))
}
}
impl FromStr for Key {
type Err = crate::TomlError;
/// Tries to parse a key from a &str,
/// if fails, tries as basic quoted key (surrounds with "")
/// and then literal quoted key (surrounds with '')
fn from_str(s: &str) -> Result<Self, Self::Err> {
Key::try_parse_simple(s)
}
}
fn to_key_repr(key: &str) -> Repr {
if key.as_bytes().iter().copied().all(is_unquoted_char) && !key.is_empty() {
Repr::new_unchecked(key)
} else {
to_string_repr(key, Some(StringStyle::OnelineSingle), Some(false))
}
}
impl<'b> From<&'b str> for Key {
fn from(s: &'b str) -> Self {
Key::new(s)
}
}
impl<'b> From<&'b String> for Key {
fn from(s: &'b String) -> Self {
Key::new(s)
}
}
impl From<String> for Key {
fn from(s: String) -> Self {
Key::new(s)
}
}
impl From<InternalString> for Key {
fn from(s: InternalString) -> Self {
Key::new(s)
}
}
#[doc(hidden)]
impl From<Key> for InternalString {
fn from(key: Key) -> InternalString {
key.key
}
}
/// A mutable reference to a `Key`
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Hash)]
pub struct KeyMut<'k> {
key: &'k mut Key,
}
impl<'k> KeyMut<'k> {
/// Returns the parsed key value.
pub fn get(&self) -> &str {
self.key.get()
}
/// Returns the raw representation, if available.
pub fn as_repr(&self) -> Option<&Repr> {
self.key.as_repr()
}
/// Returns the default raw representation.
pub fn default_repr(&self) -> Repr {
self.key.default_repr()
}
/// Returns a raw representation.
pub fn display_repr(&self) -> Cow<str> {
self.key.display_repr()
}
/// Returns the surrounding whitespace
pub fn decor_mut(&mut self) -> &mut Decor {
self.key.decor_mut()
}
/// Returns the surrounding whitespace
pub fn decor(&self) -> &Decor {
self.key.decor()
}
/// Auto formats the key.
pub fn fmt(&mut self) {
self.key.fmt()
}
}
impl<'k> std::ops::Deref for KeyMut<'k> {
type Target = str;
fn deref(&self) -> &Self::Target {
self.get()
}
}
impl<'s> PartialEq<str> for KeyMut<'s> {
#[inline]
fn eq(&self, other: &str) -> bool {
PartialEq::eq(self.get(), other)
}
}
impl<'s> PartialEq<&'s str> for KeyMut<'s> {
#[inline]
fn eq(&self, other: &&str) -> bool {
PartialEq::eq(self.get(), *other)
}
}
impl<'s> PartialEq<String> for KeyMut<'s> {
#[inline]
fn eq(&self, other: &String) -> bool {
PartialEq::eq(self.get(), other.as_str())
}
}
impl<'k> std::fmt::Display for KeyMut<'k> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(&self.key, f)
}
}
|
use crate::block::Block;
pub struct BlockChain {
pub blocks: Vec<Block>,
}
impl BlockChain {
pub fn new() -> Self {
BlockChain {
blocks: vec![Block::new_genesis_block()],
}
}
pub fn add_block(&mut self, data: &str) {
let prev_block = self.blocks.last().expect("Should have at least one block");
let new_block = Block::new(data, &prev_block.hash);
self.blocks.push(new_block)
}
}
|
pub trait AudioEngine {
fn load_module(&self, file: &str);
fn mod_fade_in(&self, file: &str);
fn mod_fade_out(&self);
fn end_module(&self);
fn set_mod_order(&self, order: i32);
}
|
//! # Seraph
//!
//! Seraph is an idiomatic, async [Matrix](https://matrix.org) bot API library.
#![deny(clippy::all)]
#![deny(missing_docs)]
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
|
use std::{self,
env::VarError,
ffi::{OsStr,
OsString},
str::FromStr};
/// Fetches the environment variable `key` from the current process, but only it is not empty.
///
/// This function augments the `std::env::var` function from the standard library, only by
/// returning a `VarError::NotPresent` if the environment variable is set, but the value is empty.
///
/// # Examples
///
/// ```
/// use habitat_core;
/// use std;
///
/// let key = "_I_AM_A_TEAPOT_COMMA_RIGHT_PEOPLE_QUESTION_MARK_";
/// std::env::set_var(key, "");
/// match habitat_core::env::var(key) {
/// Ok(val) => panic!("The environment variable {} is set but empty!", key),
/// Err(e) => {
/// println!("The environment variable {} is set, but empty. Not useful!",
/// key)
/// }
/// }
/// ```
pub fn var<K: AsRef<OsStr>>(key: K) -> std::result::Result<String, VarError> {
match std::env::var(key) {
Ok(val) => {
if val.is_empty() {
Err(VarError::NotPresent)
} else {
Ok(val)
}
}
Err(e) => Err(e),
}
}
/// Fetches the environment variable `key` from the current process, but only it is not empty.
///
/// This function augments the `std::env::var_os` function from the standard library, only by
/// returning a `VarError::NotPresent` if the environment variable is set, but the value is empty.
///
/// # Examples
///
/// ```
/// use habitat_core;
/// use std;
///
/// let key = "_I_AM_A_TEAPOT_COMMA_RIGHT_PEOPLE_QUESTION_MARK_";
/// std::env::set_var(key, "");
/// match habitat_core::env::var_os(key) {
/// Some(val) => panic!("The environment variable {} is set but empty!", key),
/// None => {
/// println!("The environment variable {} is set, but empty. Not useful!",
/// key)
/// }
/// }
/// ```
pub fn var_os<K: AsRef<OsStr>>(key: K) -> std::option::Option<OsString> {
match std::env::var_os(key) {
Some(val) => {
if val.to_string_lossy().as_ref().is_empty() {
None
} else {
Some(val)
}
}
None => None,
}
}
/// Enable the creation of a value based on an environment variable
/// that can be supplied at runtime by the user.
pub trait Config: Default + FromStr {
/// The environment variable that will be parsed to create an
/// instance of `Self`.
const ENVVAR: &'static str;
/// Generate an instance of `Self` from the value of the
/// environment variable `Self::ENVVAR`.
///
/// If the environment variable is present and not empty, its
/// value will be parsed as `Self`. If it cannot be parsed, or the
/// environment variable is not present, the default value of the
/// type will be given instead.
fn configured_value() -> Self {
match var(Self::ENVVAR) {
Err(VarError::NotPresent) => Self::default(),
Ok(val) => {
match val.parse() {
Ok(parsed) => {
Self::log_parsable(&val);
parsed
}
Err(_) => {
Self::log_unparsable(&val);
Self::default()
}
}
}
Err(VarError::NotUnicode(nu)) => {
Self::log_unparsable(nu.to_string_lossy());
Self::default()
}
}
}
/// Overridable function for logging when an environment variable
/// value was found and was successfully parsed as a `Self`.
///
/// By default, we log a message at the `warn` level.
fn log_parsable(env_value: &str) {
warn!("Found '{}' in environment; using value '{}'",
Self::ENVVAR,
env_value);
}
/// Overridable function for logging when an environment variable
/// value was found and was _not_ successfully parsed as a `Self`.
///
/// By default, we log a message at the `warn` level.
fn log_unparsable<S>(env_value: S)
where S: AsRef<str>
{
warn!("Found '{}' in environment, but value '{}' was unparsable; using default instead",
Self::ENVVAR,
env_value.as_ref());
}
}
|
use std::num::NonZeroUsize;
use crate::{span::RawSpan, syntax::SyntaxKind};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Event {
Enter {
kind: SyntaxKind,
preceded_by: Option<NonZeroUsize>,
},
Token {
kind: SyntaxKind,
span: RawSpan,
},
Exit,
Abandoned,
}
impl Event {
pub const fn is_abandoned(self) -> bool {
matches!(self, Self::Abandoned)
}
}
impl Default for Event {
fn default() -> Self {
Self::Abandoned
}
}
|
pub fn sum_of_squares(x: u64) -> u64 {
(1..x+1).fold(0, |acc, num| num*num+acc)
}
pub fn square_of_sum(x: u64) -> u64 {
let sum = (1..x+1).fold(0, |acc, num| acc+num) ;
sum * sum
}
pub fn difference(x: u64) -> u64{
square_of_sum(x)-sum_of_squares(x)
}
|
use Print;
use action::{IFlagAction, ParseResult};
impl IFlagAction for Print {
fn parse_flag(&self) -> ParseResult {
if self.0.ends_with('\n') {
print!("{}", self.0);
} else {
println!("{}", self.0);
}
return ParseResult::Exit;
}
}
|
/*struct binOpC {
op: String,
left: Option<Box<EXCR3>>,
right: Option<Box<EXCR3>>
}
struct ifC {
test: Option<Box<EXCR3>>,
then: Option<Box<EXCR3>>,
els: Option<Box<EXCR3>>
}
struct appC {
fun: Option<Box<EXCR3>>,
args: Vec<Option<Box<EXCR3>>>
}
struct lamC {
body: Option<Box<EXCR3>>,
args: Vec<String>
}*/
use std::convert::AsRef;
enum Operator {
plus,
mult,
div,
sub,
leq,
eq
}
enum EXCR3 {
numC {n: i32},
binOpC {op: Operator, left: Box<EXCR3>, right: Box<EXCR3>},
//boolC {b: bool},
//ifC {test: Option<Box<EXCR3>>, then: Option<Box<EXCR3>>, els: Option<Box<EXCR3>>},
//idC {id: String},
//appC {fun: Option<Box<EXCR3>>, args: Vec<Option<Box<EXCR3>>>},
//lamC {body: Option<Box<EXCR3>>, args: Vec<String>}
}
/*impl PartialEq for EXCR3 {
fn eq(&self, other: &EXCR3) -> bool {
true
}
}*/
struct Binding {
name : String,
val: Box<Value>
}
struct Environment {
Env : Vec<Box<Binding>>
}
enum Value {
numV { n : i32},
//boolV { b : bool},
//closV { args : Vec<String>, body : Option<Box<EXCR3>>, env : Option<Box<Environment>>},
}
fn interp(e: EXCR3) -> i32 {
match e {
EXCR3::numC {n} => n,
EXCR3::binOpC {op: Operator::plus, left, right} =>
interp(*left) + interp(*right),
EXCR3::binOpC {op: Operator::mult, left, right} =>
interp(*left) * interp(*right),
EXCR3::binOpC {op: Operator::div, left, right} =>
interp(*left) / interp(*right),
EXCR3::binOpC {op: Operator::sub, left, right} =>
interp(*left) - interp(*right),
EXCR3::binOpC {op: Operator::leq, left, right} =>
//interp(*left) + interp(*right)
0,
EXCR3::binOpC {op: Operator::eq, left, right} =>
//interp(*left) + interp(*right)
0
}
}
/*fn parse(s: String) -> EXCR3 {
match s {
Some(number) => EXCR3::numC {n: number},
None => EXCR3::idC {id: s}
}
}*/
fn test_suite() {
// Something weird with Rust comparing equality of structs, will figure out tomorrow...
assert_eq!(interp(EXCR3::numC{n: 4}), 4);
assert_eq!(interp(EXCR3::binOpC{op: Operator::plus, left: (Box::new (EXCR3::numC{n: 4})), right: (Box::new (EXCR3::numC{n: 4}))}), 8);
//assert_eq!(interp(EXCR3::binOpC{op: "+", left: EXCR3::numC{n: 2}, right: EXCR3::numC{n: 2}},
//Environment{Env: Vec::new()}), 4);
}
fn main() {
test_suite();
}
|
use std::io::Error;
use std::path::{Path, PathBuf};
use bytes::{Bytes, BytesMut};
use futures::{task, Async, Future, Poll, Stream};
use mime::Mime;
use reqwest::r#async::multipart::Part;
use tokio_codec::{BytesCodec, FramedRead};
use tokio_fs::file::{File, OpenFuture};
use tokio_io::AsyncRead;
pub struct FileSource {
pub inner: FileStream,
pub filename: String,
pub mime: Mime,
}
impl From<FileSource> for Part {
fn from(source: FileSource) -> Part {
Part::stream(source.inner)
.file_name(source.filename)
.mime_str(&source.mime.to_string())
.expect("FileSource::into::<Part>()")
}
}
enum State {
File(OpenFuture<PathBuf>),
Read(FramedRead<Box<dyn AsyncRead + Send + Sync>, BytesCodec>),
}
pub struct FileStream {
state: Option<State>,
}
impl FileStream {
pub fn new<T: 'static + AsyncRead + Send + Sync>(inner: T) -> FileStream {
let framed = FramedRead::new(
Box::new(inner) as Box<dyn AsyncRead + Send + Sync>,
BytesCodec::new(),
);
FileStream {
state: Some(State::Read(framed)),
}
}
pub fn open<P: AsRef<Path>>(file: P) -> FileStream {
FileStream {
state: Some(State::File(File::open(file.as_ref().to_path_buf()))),
}
}
}
impl Stream for FileStream {
type Item = Bytes;
type Error = Error;
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
match self.state.take() {
Some(State::File(mut stream)) => {
if let Async::Ready(file) = stream.poll()? {
let framed = FramedRead::new(
Box::new(file) as Box<dyn AsyncRead + Send + Sync>,
BytesCodec::new(),
);
self.state = Some(State::Read(framed));
task::current().notify();
} else {
self.state = Some(State::File(stream));
}
Ok(Async::NotReady)
}
Some(State::Read(mut stream)) => {
let ret = stream.poll();
self.state = Some(State::Read(stream));
if let Async::Ready(bytes) = ret? {
Ok(Async::Ready(bytes.map(BytesMut::freeze)))
} else {
Ok(Async::NotReady)
}
}
None => unreachable!(),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::io;
use futures::{Future, Stream};
use tokio::runtime::Runtime;
#[test]
fn new() {
let mut rt = Runtime::new().expect("new rt");
let r = io::Cursor::new(b"Hello World");
let fs = FileStream::new(r).concat2().and_then(|bytes| {
assert_eq!(bytes, &b"Hello World"[..]);
Ok(())
});
rt.block_on(fs).unwrap();
}
#[test]
fn open() {
let mut rt = Runtime::new().expect("new rt");
let fs = FileStream::open("Cargo.toml").concat2().and_then(|bytes| {
assert_eq!(bytes, &include_bytes!("../Cargo.toml")[..]);
Ok(())
});
rt.block_on(fs).unwrap();
}
}
|
extern crate iron;
use super::Root;
use self::iron::prelude::*;
use self::iron::status;
use std::net::SocketAddrV4;
use std::net::SocketAddrV6;
pub struct Daemon {
settings: Settings
}
impl Daemon {
pub fn new(root: &Root) -> Daemon {
let settings = root.settings();
let address = settings.lookup("daemon.address").expect("Could not find address in settings");
let address = address.as_str().expect("Invalid type for address in settings").to_string();
Daemon {
settings: Settings {
address: address
}
}
}
}
impl Daemon {
pub fn listen(&self) {
let address = self.settings.address();
println!("Opening iron server on \"{}\"", address);
fn hello_world(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((status::Ok, "Hello Rust!")))
}
if let Ok(address) = address.parse::<SocketAddrV6>() {
Iron::new(hello_world).http(address).unwrap();
} else if let Ok(address) = address.parse::<SocketAddrV4>() {
Iron::new(hello_world).http(address).unwrap();
}
panic!("Could not parse address");
}
pub fn settings(&self) -> &Settings {
&self.settings
}
}
pub struct Settings {
address: String
}
impl Settings {
pub fn address(&self) -> &String {
&self.address
}
}
|
use crate::prelude::*;
use std::os::raw::c_void;
use std::ptr;
#[repr(C)]
#[derive(Debug)]
pub struct VkImageCreateInfo {
pub sType: VkStructureType,
pub pNext: *const c_void,
pub flags: VkImageCreateFlagBits,
pub imageType: VkImageType,
pub format: VkFormat,
pub extent: VkExtent3D,
pub mipLevels: u32,
pub arrayLayers: u32,
pub samples: VkSampleCountFlagBits,
pub tiling: VkImageTiling,
pub usage: VkImageUsageFlagBits,
pub sharingMode: VkSharingMode,
pub queueFamilyIndexCount: u32,
pub pQueueFamilyIndices: *const u32,
pub initialLayout: VkImageLayout,
}
impl VkImageCreateInfo {
pub fn new<T, U, V>(
flags: T,
image_type: VkImageType,
format: VkFormat,
extent: VkExtent3D,
mip_levels: u32,
array_layers: u32,
samples: U,
tiling: VkImageTiling,
usage: V,
sharing_mode: VkSharingMode,
queue_family_indices: &[u32],
initial_layout: VkImageLayout,
) -> Self
where
T: Into<VkImageCreateFlagBits>,
U: Into<VkSampleCountFlagBits>,
V: Into<VkImageUsageFlagBits>,
{
VkImageCreateInfo {
sType: VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
pNext: ptr::null(),
flags: flags.into(),
imageType: image_type,
format,
extent,
mipLevels: mip_levels,
arrayLayers: array_layers,
samples: samples.into(),
tiling,
usage: usage.into(),
sharingMode: sharing_mode,
queueFamilyIndexCount: queue_family_indices.len() as u32,
pQueueFamilyIndices: queue_family_indices.as_ptr(),
initialLayout: initial_layout,
}
}
}
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../gir-files
// DO NOT EDIT
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
use crate::Address;
use crate::Auth;
use crate::Message;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
use crate::Request;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
use crate::RequestHTTP;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
use crate::SessionFeature;
use crate::Socket;
use crate::URI;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use std::boxed::Box as Box_;
use std::fmt;
use std::mem::transmute;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
use std::pin::Pin;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
use std::ptr;
glib::wrapper! {
#[doc(alias = "SoupSession")]
pub struct Session(Object<ffi::SoupSession, ffi::SoupSessionClass>);
match fn {
type_ => || ffi::soup_session_get_type(),
}
}
impl Session {
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_new")]
pub fn new() -> Session {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::soup_session_new())
}
}
//#[cfg(any(feature = "v2_42", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
//#[doc(alias = "soup_session_new_with_options")]
//#[doc(alias = "new_with_options")]
//pub fn with_options(optname1: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Session {
// unsafe { TODO: call ffi:soup_session_new_with_options() }
//}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
impl Default for Session {
fn default() -> Self {
Self::new()
}
}
pub const NONE_SESSION: Option<&Session> = None;
pub trait SessionExt: 'static {
#[doc(alias = "soup_session_abort")]
fn abort(&self);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "soup_session_add_feature")]
fn add_feature<P: IsA<SessionFeature>>(&self, feature: &P);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "soup_session_add_feature_by_type")]
fn add_feature_by_type(&self, feature_type: glib::types::Type);
#[doc(alias = "soup_session_cancel_message")]
fn cancel_message<P: IsA<Message>>(&self, msg: &P, status_code: u32);
//#[cfg(any(feature = "v2_62", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_62")))]
//#[doc(alias = "soup_session_connect_async")]
//fn connect_async<P: IsA<gio::Cancellable>, Q: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static, R: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static>(&self, uri: &mut URI, cancellable: Option<&P>, progress_callback: Q, callback: R);
//
//#[cfg(any(feature = "v2_62", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_62")))]
//fn connect_async_future<Q: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static>(&self, uri: &mut URI, progress_callback: Q) -> Pin<Box_<dyn std::future::Future<Output = Result<gio::IOStream, glib::Error>> + 'static>>;
#[doc(alias = "soup_session_get_async_context")]
#[doc(alias = "get_async_context")]
fn async_context(&self) -> Option<glib::MainContext>;
#[cfg(any(feature = "v2_26", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_26")))]
#[doc(alias = "soup_session_get_feature")]
#[doc(alias = "get_feature")]
fn feature(&self, feature_type: glib::types::Type) -> Option<SessionFeature>;
#[cfg(any(feature = "v2_28", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_28")))]
#[doc(alias = "soup_session_get_feature_for_message")]
#[doc(alias = "get_feature_for_message")]
fn feature_for_message<P: IsA<Message>>(&self, feature_type: glib::types::Type, msg: &P) -> Option<SessionFeature>;
#[cfg(any(feature = "v2_26", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_26")))]
#[doc(alias = "soup_session_get_features")]
#[doc(alias = "get_features")]
fn features(&self, feature_type: glib::types::Type) -> Vec<SessionFeature>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_has_feature")]
fn has_feature(&self, feature_type: glib::types::Type) -> bool;
#[doc(alias = "soup_session_pause_message")]
fn pause_message<P: IsA<Message>>(&self, msg: &P);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "soup_session_prefetch_dns")]
fn prefetch_dns<P: IsA<gio::Cancellable>>(&self, hostname: &str, cancellable: Option<&P>, callback: Option<Box_<dyn FnOnce(&Address, u32) + 'static>>);
#[cfg_attr(feature = "v2_38", deprecated = "Since 2.38")]
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "soup_session_prepare_for_uri")]
fn prepare_for_uri(&self, uri: &mut URI);
#[doc(alias = "soup_session_queue_message")]
fn queue_message<P: IsA<Message>>(&self, msg: &P, callback: Option<Box_<dyn FnOnce(&Session, &Message) + 'static>>);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "soup_session_redirect_message")]
fn redirect_message<P: IsA<Message>>(&self, msg: &P) -> bool;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "soup_session_remove_feature")]
fn remove_feature<P: IsA<SessionFeature>>(&self, feature: &P);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "soup_session_remove_feature_by_type")]
fn remove_feature_by_type(&self, feature_type: glib::types::Type);
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_request")]
fn request(&self, uri_string: &str) -> Result<Request, glib::Error>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_request_http")]
fn request_http(&self, method: &str, uri_string: &str) -> Result<RequestHTTP, glib::Error>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_request_http_uri")]
fn request_http_uri(&self, method: &str, uri: &mut URI) -> Result<RequestHTTP, glib::Error>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_request_uri")]
fn request_uri(&self, uri: &mut URI) -> Result<Request, glib::Error>;
#[doc(alias = "soup_session_requeue_message")]
fn requeue_message<P: IsA<Message>>(&self, msg: &P);
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_send")]
fn send<P: IsA<Message>, Q: IsA<gio::Cancellable>>(&self, msg: &P, cancellable: Option<&Q>) -> Result<gio::InputStream, glib::Error>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "soup_session_send_async")]
fn send_async<P: IsA<Message>, Q: IsA<gio::Cancellable>, R: FnOnce(Result<gio::InputStream, glib::Error>) + Send + 'static>(&self, msg: &P, cancellable: Option<&Q>, callback: R);
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn send_async_future<P: IsA<Message> + Clone + 'static>(&self, msg: &P) -> Pin<Box_<dyn std::future::Future<Output = Result<gio::InputStream, glib::Error>> + 'static>>;
#[doc(alias = "soup_session_send_message")]
fn send_message<P: IsA<Message>>(&self, msg: &P) -> u32;
#[cfg(any(feature = "v2_50", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_50")))]
#[doc(alias = "soup_session_steal_connection")]
fn steal_connection<P: IsA<Message>>(&self, msg: &P) -> Option<gio::IOStream>;
#[doc(alias = "soup_session_unpause_message")]
fn unpause_message<P: IsA<Message>>(&self, msg: &P);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "soup_session_would_redirect")]
fn would_redirect<P: IsA<Message>>(&self, msg: &P) -> bool;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language")]
fn accept_language(&self) -> Option<glib::GString>;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language")]
fn set_accept_language(&self, accept_language: Option<&str>);
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language-auto")]
fn accepts_language_auto(&self) -> bool;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language-auto")]
fn set_accept_language_auto(&self, accept_language_auto: bool);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "add-feature")]
fn set_add_feature<P: IsA<SessionFeature>>(&self, add_feature: Option<&P>);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "add-feature-by-type")]
fn set_add_feature_by_type(&self, add_feature_by_type: glib::types::Type);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "http-aliases")]
fn http_aliases(&self) -> Vec<glib::GString>;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "http-aliases")]
fn set_http_aliases(&self, http_aliases: &[&str]);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "https-aliases")]
fn https_aliases(&self) -> Vec<glib::GString>;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "https-aliases")]
fn set_https_aliases(&self, https_aliases: &[&str]);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "idle-timeout")]
fn idle_timeout(&self) -> u32;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "idle-timeout")]
fn set_idle_timeout(&self, idle_timeout: u32);
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "local-address")]
fn local_address(&self) -> Option<Address>;
#[doc(alias = "max-conns")]
fn max_conns(&self) -> i32;
#[doc(alias = "max-conns")]
fn set_max_conns(&self, max_conns: i32);
#[doc(alias = "max-conns-per-host")]
fn max_conns_per_host(&self) -> i32;
#[doc(alias = "max-conns-per-host")]
fn set_max_conns_per_host(&self, max_conns_per_host: i32);
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "proxy-resolver")]
fn proxy_resolver(&self) -> Option<gio::ProxyResolver>;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "proxy-resolver")]
fn set_proxy_resolver<P: IsA<gio::ProxyResolver>>(&self, proxy_resolver: Option<&P>);
#[cfg_attr(feature = "v2_70", deprecated = "Since 2.70")]
#[doc(alias = "proxy-uri")]
fn proxy_uri(&self) -> Option<URI>;
#[cfg_attr(feature = "v2_70", deprecated = "Since 2.70")]
#[doc(alias = "proxy-uri")]
fn set_proxy_uri(&self, proxy_uri: Option<&URI>);
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "remove-feature-by-type")]
fn set_remove_feature_by_type(&self, remove_feature_by_type: glib::types::Type);
#[doc(alias = "ssl-ca-file")]
fn ssl_ca_file(&self) -> Option<glib::GString>;
#[doc(alias = "ssl-ca-file")]
fn set_ssl_ca_file(&self, ssl_ca_file: Option<&str>);
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "ssl-strict")]
fn is_ssl_strict(&self) -> bool;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "ssl-strict")]
fn set_ssl_strict(&self, ssl_strict: bool);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "ssl-use-system-ca-file")]
fn is_ssl_use_system_ca_file(&self) -> bool;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "ssl-use-system-ca-file")]
fn set_ssl_use_system_ca_file(&self, ssl_use_system_ca_file: bool);
fn timeout(&self) -> u32;
fn set_timeout(&self, timeout: u32);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "tls-database")]
fn tls_database(&self) -> Option<gio::TlsDatabase>;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "tls-database")]
fn set_tls_database<P: IsA<gio::TlsDatabase>>(&self, tls_database: Option<&P>);
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
#[doc(alias = "tls-interaction")]
fn tls_interaction(&self) -> Option<gio::TlsInteraction>;
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
#[doc(alias = "tls-interaction")]
fn set_tls_interaction<P: IsA<gio::TlsInteraction>>(&self, tls_interaction: Option<&P>);
#[doc(alias = "use-ntlm")]
fn uses_ntlm(&self) -> bool;
#[doc(alias = "use-ntlm")]
fn set_use_ntlm(&self, use_ntlm: bool);
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "use-thread-context")]
fn uses_thread_context(&self) -> bool;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "use-thread-context")]
fn set_use_thread_context(&self, use_thread_context: bool);
#[doc(alias = "user-agent")]
fn user_agent(&self) -> Option<glib::GString>;
#[doc(alias = "user-agent")]
fn set_user_agent(&self, user_agent: Option<&str>);
#[doc(alias = "authenticate")]
fn connect_authenticate<F: Fn(&Self, &Message, &Auth, bool) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "connection-created")]
fn connect_connection_created<F: Fn(&Self, &glib::Object) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "request-queued")]
fn connect_request_queued<F: Fn(&Self, &Message) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
#[doc(alias = "request-started")]
fn connect_request_started<F: Fn(&Self, &Message, &Socket) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "request-unqueued")]
fn connect_request_unqueued<F: Fn(&Self, &Message) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "tunneling")]
fn connect_tunneling<F: Fn(&Self, &glib::Object) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language")]
fn connect_accept_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "accept-language-auto")]
fn connect_accept_language_auto_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "add-feature")]
fn connect_add_feature_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "add-feature-by-type")]
fn connect_add_feature_by_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "http-aliases")]
fn connect_http_aliases_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "https-aliases")]
fn connect_https_aliases_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "idle-timeout")]
fn connect_idle_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "max-conns")]
fn connect_max_conns_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "max-conns-per-host")]
fn connect_max_conns_per_host_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
#[doc(alias = "proxy-resolver")]
fn connect_proxy_resolver_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg_attr(feature = "v2_70", deprecated = "Since 2.70")]
#[doc(alias = "proxy-uri")]
fn connect_proxy_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
#[doc(alias = "remove-feature-by-type")]
fn connect_remove_feature_by_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "ssl-ca-file")]
fn connect_ssl_ca_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
#[doc(alias = "ssl-strict")]
fn connect_ssl_strict_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "ssl-use-system-ca-file")]
fn connect_ssl_use_system_ca_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "timeout")]
fn connect_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "tls-database")]
fn connect_tls_database_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
#[doc(alias = "tls-interaction")]
fn connect_tls_interaction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "use-ntlm")]
fn connect_use_ntlm_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
#[doc(alias = "use-thread-context")]
fn connect_use_thread_context_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "user-agent")]
fn connect_user_agent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<Session>> SessionExt for O {
fn abort(&self) {
unsafe {
ffi::soup_session_abort(self.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn add_feature<P: IsA<SessionFeature>>(&self, feature: &P) {
unsafe {
ffi::soup_session_add_feature(self.as_ref().to_glib_none().0, feature.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn add_feature_by_type(&self, feature_type: glib::types::Type) {
unsafe {
ffi::soup_session_add_feature_by_type(self.as_ref().to_glib_none().0, feature_type.into_glib());
}
}
fn cancel_message<P: IsA<Message>>(&self, msg: &P, status_code: u32) {
unsafe {
ffi::soup_session_cancel_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0, status_code);
}
}
//#[cfg(any(feature = "v2_62", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_62")))]
//fn connect_async<P: IsA<gio::Cancellable>, Q: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static, R: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static>(&self, uri: &mut URI, cancellable: Option<&P>, progress_callback: Q, callback: R) {
// unsafe { TODO: call ffi:soup_session_connect_async() }
//}
//
//#[cfg(any(feature = "v2_62", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_62")))]
//fn connect_async_future<Q: FnOnce(Result<gio::IOStream, glib::Error>) + Send + 'static>(&self, uri: &mut URI, progress_callback: Q) -> Pin<Box_<dyn std::future::Future<Output = Result<gio::IOStream, glib::Error>> + 'static>> {
//let uri = uri.clone();
//let progress_callback = progress_callback.map(ToOwned::to_owned);
//Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| {
// obj.connect_async(
// &uri,
// Some(cancellable),
// progress_callback.as_ref().map(::std::borrow::Borrow::borrow),
// move |res| {
// send.resolve(res);
// },
// );
//}))
//}
fn async_context(&self) -> Option<glib::MainContext> {
unsafe {
from_glib_none(ffi::soup_session_get_async_context(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_26", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_26")))]
fn feature(&self, feature_type: glib::types::Type) -> Option<SessionFeature> {
unsafe {
from_glib_none(ffi::soup_session_get_feature(self.as_ref().to_glib_none().0, feature_type.into_glib()))
}
}
#[cfg(any(feature = "v2_28", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_28")))]
fn feature_for_message<P: IsA<Message>>(&self, feature_type: glib::types::Type, msg: &P) -> Option<SessionFeature> {
unsafe {
from_glib_none(ffi::soup_session_get_feature_for_message(self.as_ref().to_glib_none().0, feature_type.into_glib(), msg.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_26", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_26")))]
fn features(&self, feature_type: glib::types::Type) -> Vec<SessionFeature> {
unsafe {
FromGlibPtrContainer::from_glib_container(ffi::soup_session_get_features(self.as_ref().to_glib_none().0, feature_type.into_glib()))
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn has_feature(&self, feature_type: glib::types::Type) -> bool {
unsafe {
from_glib(ffi::soup_session_has_feature(self.as_ref().to_glib_none().0, feature_type.into_glib()))
}
}
fn pause_message<P: IsA<Message>>(&self, msg: &P) {
unsafe {
ffi::soup_session_pause_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn prefetch_dns<P: IsA<gio::Cancellable>>(&self, hostname: &str, cancellable: Option<&P>, callback: Option<Box_<dyn FnOnce(&Address, u32) + 'static>>) {
let callback_data: Box_<Option<Box_<dyn FnOnce(&Address, u32) + 'static>>> = Box_::new(callback);
unsafe extern "C" fn callback_func<P: IsA<gio::Cancellable>>(addr: *mut ffi::SoupAddress, status: libc::c_uint, user_data: glib::ffi::gpointer) {
let addr = from_glib_borrow(addr);
let callback: Box_<Option<Box_<dyn FnOnce(&Address, u32) + 'static>>> = Box_::from_raw(user_data as *mut _);
let callback = (*callback).expect("cannot get closure...");
callback(&addr, status)
}
let callback = if callback_data.is_some() { Some(callback_func::<P> as _) } else { None };
let super_callback0: Box_<Option<Box_<dyn FnOnce(&Address, u32) + 'static>>> = callback_data;
unsafe {
ffi::soup_session_prefetch_dns(self.as_ref().to_glib_none().0, hostname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, callback, Box_::into_raw(super_callback0) as *mut _);
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn prepare_for_uri(&self, uri: &mut URI) {
unsafe {
ffi::soup_session_prepare_for_uri(self.as_ref().to_glib_none().0, uri.to_glib_none_mut().0);
}
}
fn queue_message<P: IsA<Message>>(&self, msg: &P, callback: Option<Box_<dyn FnOnce(&Session, &Message) + 'static>>) {
let callback_data: Box_<Option<Box_<dyn FnOnce(&Session, &Message) + 'static>>> = Box_::new(callback);
unsafe extern "C" fn callback_func<P: IsA<Message>>(session: *mut ffi::SoupSession, msg: *mut ffi::SoupMessage, user_data: glib::ffi::gpointer) {
let session = from_glib_borrow(session);
let msg = from_glib_borrow(msg);
let callback: Box_<Option<Box_<dyn FnOnce(&Session, &Message) + 'static>>> = Box_::from_raw(user_data as *mut _);
let callback = (*callback).expect("cannot get closure...");
callback(&session, &msg)
}
let callback = if callback_data.is_some() { Some(callback_func::<P> as _) } else { None };
let super_callback0: Box_<Option<Box_<dyn FnOnce(&Session, &Message) + 'static>>> = callback_data;
unsafe {
ffi::soup_session_queue_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_full(), callback, Box_::into_raw(super_callback0) as *mut _);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn redirect_message<P: IsA<Message>>(&self, msg: &P) -> bool {
unsafe {
from_glib(ffi::soup_session_redirect_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn remove_feature<P: IsA<SessionFeature>>(&self, feature: &P) {
unsafe {
ffi::soup_session_remove_feature(self.as_ref().to_glib_none().0, feature.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn remove_feature_by_type(&self, feature_type: glib::types::Type) {
unsafe {
ffi::soup_session_remove_feature_by_type(self.as_ref().to_glib_none().0, feature_type.into_glib());
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn request(&self, uri_string: &str) -> Result<Request, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_request(self.as_ref().to_glib_none().0, uri_string.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn request_http(&self, method: &str, uri_string: &str) -> Result<RequestHTTP, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_request_http(self.as_ref().to_glib_none().0, method.to_glib_none().0, uri_string.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn request_http_uri(&self, method: &str, uri: &mut URI) -> Result<RequestHTTP, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_request_http_uri(self.as_ref().to_glib_none().0, method.to_glib_none().0, uri.to_glib_none_mut().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn request_uri(&self, uri: &mut URI) -> Result<Request, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_request_uri(self.as_ref().to_glib_none().0, uri.to_glib_none_mut().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
fn requeue_message<P: IsA<Message>>(&self, msg: &P) {
unsafe {
ffi::soup_session_requeue_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn send<P: IsA<Message>, Q: IsA<gio::Cancellable>>(&self, msg: &P, cancellable: Option<&Q>) -> Result<gio::InputStream, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_send(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn send_async<P: IsA<Message>, Q: IsA<gio::Cancellable>, R: FnOnce(Result<gio::InputStream, glib::Error>) + Send + 'static>(&self, msg: &P, cancellable: Option<&Q>, callback: R) {
let user_data: Box_<R> = Box_::new(callback);
unsafe extern "C" fn send_async_trampoline<R: FnOnce(Result<gio::InputStream, glib::Error>) + Send + 'static>(_source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer) {
let mut error = ptr::null_mut();
let ret = ffi::soup_session_send_finish(_source_object as *mut _, res, &mut error);
let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) };
let callback: Box_<R> = Box_::from_raw(user_data as *mut _);
callback(result);
}
let callback = send_async_trampoline::<R>;
unsafe {
ffi::soup_session_send_async(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _);
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn send_async_future<P: IsA<Message> + Clone + 'static>(&self, msg: &P) -> Pin<Box_<dyn std::future::Future<Output = Result<gio::InputStream, glib::Error>> + 'static>> {
let msg = msg.clone();
Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| {
obj.send_async(
&msg,
Some(cancellable),
move |res| {
send.resolve(res);
},
);
}))
}
fn send_message<P: IsA<Message>>(&self, msg: &P) -> u32 {
unsafe {
ffi::soup_session_send_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0)
}
}
#[cfg(any(feature = "v2_50", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_50")))]
fn steal_connection<P: IsA<Message>>(&self, msg: &P) -> Option<gio::IOStream> {
unsafe {
from_glib_full(ffi::soup_session_steal_connection(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0))
}
}
fn unpause_message<P: IsA<Message>>(&self, msg: &P) {
unsafe {
ffi::soup_session_unpause_message(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn would_redirect<P: IsA<Message>>(&self, msg: &P) -> bool {
unsafe {
from_glib(ffi::soup_session_would_redirect(self.as_ref().to_glib_none().0, msg.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn accept_language(&self) -> Option<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"accept-language\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `accept-language` getter")
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn set_accept_language(&self, accept_language: Option<&str>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"accept-language\0".as_ptr() as *const _, accept_language.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn accepts_language_auto(&self) -> bool {
unsafe {
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"accept-language-auto\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `accept-language-auto` getter")
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn set_accept_language_auto(&self, accept_language_auto: bool) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"accept-language-auto\0".as_ptr() as *const _, accept_language_auto.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn set_add_feature<P: IsA<SessionFeature>>(&self, add_feature: Option<&P>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"add-feature\0".as_ptr() as *const _, add_feature.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn set_add_feature_by_type(&self, add_feature_by_type: glib::types::Type) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"add-feature-by-type\0".as_ptr() as *const _, add_feature_by_type.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn http_aliases(&self) -> Vec<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<Vec<glib::GString> as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"http-aliases\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `http-aliases` getter")
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn set_http_aliases(&self, http_aliases: &[&str]) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"http-aliases\0".as_ptr() as *const _, http_aliases.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn https_aliases(&self) -> Vec<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<Vec<glib::GString> as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"https-aliases\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `https-aliases` getter")
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn set_https_aliases(&self, https_aliases: &[&str]) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"https-aliases\0".as_ptr() as *const _, https_aliases.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn idle_timeout(&self) -> u32 {
unsafe {
let mut value = glib::Value::from_type(<u32 as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"idle-timeout\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `idle-timeout` getter")
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn set_idle_timeout(&self, idle_timeout: u32) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"idle-timeout\0".as_ptr() as *const _, idle_timeout.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn local_address(&self) -> Option<Address> {
unsafe {
let mut value = glib::Value::from_type(<Address as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"local-address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `local-address` getter")
}
}
fn max_conns(&self) -> i32 {
unsafe {
let mut value = glib::Value::from_type(<i32 as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"max-conns\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `max-conns` getter")
}
}
fn set_max_conns(&self, max_conns: i32) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"max-conns\0".as_ptr() as *const _, max_conns.to_value().to_glib_none().0);
}
}
fn max_conns_per_host(&self) -> i32 {
unsafe {
let mut value = glib::Value::from_type(<i32 as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"max-conns-per-host\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `max-conns-per-host` getter")
}
}
fn set_max_conns_per_host(&self, max_conns_per_host: i32) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"max-conns-per-host\0".as_ptr() as *const _, max_conns_per_host.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn proxy_resolver(&self) -> Option<gio::ProxyResolver> {
unsafe {
let mut value = glib::Value::from_type(<gio::ProxyResolver as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"proxy-resolver\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `proxy-resolver` getter")
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn set_proxy_resolver<P: IsA<gio::ProxyResolver>>(&self, proxy_resolver: Option<&P>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"proxy-resolver\0".as_ptr() as *const _, proxy_resolver.to_value().to_glib_none().0);
}
}
fn proxy_uri(&self) -> Option<URI> {
unsafe {
let mut value = glib::Value::from_type(<URI as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"proxy-uri\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `proxy-uri` getter")
}
}
fn set_proxy_uri(&self, proxy_uri: Option<&URI>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"proxy-uri\0".as_ptr() as *const _, proxy_uri.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn set_remove_feature_by_type(&self, remove_feature_by_type: glib::types::Type) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"remove-feature-by-type\0".as_ptr() as *const _, remove_feature_by_type.to_value().to_glib_none().0);
}
}
fn ssl_ca_file(&self) -> Option<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-ca-file\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `ssl-ca-file` getter")
}
}
fn set_ssl_ca_file(&self, ssl_ca_file: Option<&str>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-ca-file\0".as_ptr() as *const _, ssl_ca_file.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn is_ssl_strict(&self) -> bool {
unsafe {
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-strict\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `ssl-strict` getter")
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn set_ssl_strict(&self, ssl_strict: bool) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-strict\0".as_ptr() as *const _, ssl_strict.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn is_ssl_use_system_ca_file(&self) -> bool {
unsafe {
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-use-system-ca-file\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `ssl-use-system-ca-file` getter")
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn set_ssl_use_system_ca_file(&self, ssl_use_system_ca_file: bool) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"ssl-use-system-ca-file\0".as_ptr() as *const _, ssl_use_system_ca_file.to_value().to_glib_none().0);
}
}
fn timeout(&self) -> u32 {
unsafe {
let mut value = glib::Value::from_type(<u32 as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"timeout\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `timeout` getter")
}
}
fn set_timeout(&self, timeout: u32) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"timeout\0".as_ptr() as *const _, timeout.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn tls_database(&self) -> Option<gio::TlsDatabase> {
unsafe {
let mut value = glib::Value::from_type(<gio::TlsDatabase as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"tls-database\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `tls-database` getter")
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn set_tls_database<P: IsA<gio::TlsDatabase>>(&self, tls_database: Option<&P>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"tls-database\0".as_ptr() as *const _, tls_database.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
fn tls_interaction(&self) -> Option<gio::TlsInteraction> {
unsafe {
let mut value = glib::Value::from_type(<gio::TlsInteraction as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"tls-interaction\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `tls-interaction` getter")
}
}
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
fn set_tls_interaction<P: IsA<gio::TlsInteraction>>(&self, tls_interaction: Option<&P>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"tls-interaction\0".as_ptr() as *const _, tls_interaction.to_value().to_glib_none().0);
}
}
fn uses_ntlm(&self) -> bool {
unsafe {
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"use-ntlm\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `use-ntlm` getter")
}
}
fn set_use_ntlm(&self, use_ntlm: bool) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"use-ntlm\0".as_ptr() as *const _, use_ntlm.to_value().to_glib_none().0);
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn uses_thread_context(&self) -> bool {
unsafe {
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"use-thread-context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `use-thread-context` getter")
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn set_use_thread_context(&self, use_thread_context: bool) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"use-thread-context\0".as_ptr() as *const _, use_thread_context.to_value().to_glib_none().0);
}
}
fn user_agent(&self) -> Option<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"user-agent\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `user-agent` getter")
}
}
fn set_user_agent(&self, user_agent: Option<&str>) {
unsafe {
glib::gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"user-agent\0".as_ptr() as *const _, user_agent.to_value().to_glib_none().0);
}
}
fn connect_authenticate<F: Fn(&Self, &Message, &Auth, bool) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn authenticate_trampoline<P: IsA<Session>, F: Fn(&P, &Message, &Auth, bool) + 'static>(this: *mut ffi::SoupSession, msg: *mut ffi::SoupMessage, auth: *mut ffi::SoupAuth, retrying: glib::ffi::gboolean, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(msg), &from_glib_borrow(auth), from_glib(retrying))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"authenticate\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(authenticate_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn connect_connection_created<F: Fn(&Self, &glib::Object) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn connection_created_trampoline<P: IsA<Session>, F: Fn(&P, &glib::Object) + 'static>(this: *mut ffi::SoupSession, connection: *mut glib::gobject_ffi::GObject, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(connection))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"connection-created\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(connection_created_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_request_queued<F: Fn(&Self, &Message) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn request_queued_trampoline<P: IsA<Session>, F: Fn(&P, &Message) + 'static>(this: *mut ffi::SoupSession, msg: *mut ffi::SoupMessage, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(msg))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"request-queued\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(request_queued_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_request_started<F: Fn(&Self, &Message, &Socket) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn request_started_trampoline<P: IsA<Session>, F: Fn(&P, &Message, &Socket) + 'static>(this: *mut ffi::SoupSession, msg: *mut ffi::SoupMessage, socket: *mut ffi::SoupSocket, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(msg), &from_glib_borrow(socket))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"request-started\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(request_started_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_request_unqueued<F: Fn(&Self, &Message) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn request_unqueued_trampoline<P: IsA<Session>, F: Fn(&P, &Message) + 'static>(this: *mut ffi::SoupSession, msg: *mut ffi::SoupMessage, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(msg))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"request-unqueued\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(request_unqueued_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn connect_tunneling<F: Fn(&Self, &glib::Object) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn tunneling_trampoline<P: IsA<Session>, F: Fn(&P, &glib::Object) + 'static>(this: *mut ffi::SoupSession, connection: *mut glib::gobject_ffi::GObject, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref(), &from_glib_borrow(connection))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"tunneling\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(tunneling_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn connect_accept_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_accept_language_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::accept-language\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_accept_language_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn connect_accept_language_auto_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_accept_language_auto_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::accept-language-auto\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_accept_language_auto_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_add_feature_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_add_feature_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::add-feature\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_add_feature_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_add_feature_by_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_add_feature_by_type_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::add-feature-by-type\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_add_feature_by_type_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn connect_http_aliases_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_http_aliases_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::http-aliases\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_http_aliases_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn connect_https_aliases_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_https_aliases_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::https-aliases\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_https_aliases_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_idle_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_idle_timeout_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::idle-timeout\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_idle_timeout_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_max_conns_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_max_conns_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-conns\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_max_conns_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_max_conns_per_host_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_max_conns_per_host_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-conns-per-host\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_max_conns_per_host_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_42", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_42")))]
fn connect_proxy_resolver_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_proxy_resolver_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::proxy-resolver\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_proxy_resolver_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_proxy_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_proxy_uri_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::proxy-uri\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_proxy_uri_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_24", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_24")))]
fn connect_remove_feature_by_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_remove_feature_by_type_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::remove-feature-by-type\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_remove_feature_by_type_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_ssl_ca_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ssl_ca_file_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ssl-ca-file\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_ssl_ca_file_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_30", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_30")))]
fn connect_ssl_strict_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ssl_strict_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ssl-strict\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_ssl_strict_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn connect_ssl_use_system_ca_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ssl_use_system_ca_file_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ssl-use-system-ca-file\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_ssl_use_system_ca_file_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_timeout_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_timeout_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn connect_tls_database_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_tls_database_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::tls-database\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_tls_database_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_48", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))]
fn connect_tls_interaction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_tls_interaction_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::tls-interaction\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_tls_interaction_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_use_ntlm_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_use_ntlm_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::use-ntlm\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_use_ntlm_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v2_38", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
fn connect_use_thread_context_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_use_thread_context_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::use-thread-context\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_use_thread_context_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_user_agent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_user_agent_trampoline<P: IsA<Session>, F: Fn(&P) + 'static>(this: *mut ffi::SoupSession, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(Session::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::user-agent\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_user_agent_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
}
impl fmt::Display for Session {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("Session")
}
}
|
use crate::Day;
use crate::advent::Part;
use crate::advent::Solution;
use crate::advent::Part::Part1;
use crate::advent::Part::Part2;
use std::collections::HashMap;
use std::boxed::Box;
mod day01;
mod day02;
mod day03;
mod day04;
mod day05;
pub fn day_map() -> HashMap<Day,HashMap<Part,Box<dyn Solution>>> {
vec![
(1, vec![(Part1, Box::new(day01::DAY01A) as Box<dyn Solution>),
(Part2, Box::new(day01::DAY01B) as Box<dyn Solution>)
].into_iter().collect()),
(2, vec![(Part1, Box::new(day02::DAY02A) as Box<dyn Solution>),
(Part2, Box::new(day02::DAY02B) as Box<dyn Solution>)
].into_iter().collect()),
(3, vec![(Part1, Box::new(day03::DAY03A) as Box<dyn Solution>),
(Part2, Box::new(day03::DAY03B) as Box<dyn Solution>)
].into_iter().collect()),
(4, vec![(Part1, Box::new(day04::DAY04A) as Box<dyn Solution>),
(Part2, Box::new(day04::DAY04B) as Box<dyn Solution>)
].into_iter().collect()),
(5, vec![(Part1, Box::new(day05::DAY05A) as Box<dyn Solution>),
(Part2, Box::new(day05::DAY05B) as Box<dyn Solution>)
].into_iter().collect()),
].into_iter().collect()
}
|
pub struct Solution;
impl Solution {
pub fn min_distance(word1: String, word2: String) -> i32 {
let (s, t) = if word1.len() < word2.len() {
(word1.as_bytes(), word2.as_bytes())
} else {
(word2.as_bytes(), word1.as_bytes())
};
let mut distance = (0..=s.len()).collect::<Vec<_>>();
let mut previous = distance.clone();
for j in 1..=t.len() {
let temp = previous;
previous = distance;
distance = temp;
distance[0] = previous[0] + 1;
for i in 1..=s.len() {
distance[i] = (previous[i - 1] + (s[i - 1] != t[j - 1]) as usize)
.min(previous[i] + 1)
.min(distance[i - 1] + 1);
}
}
distance.pop().unwrap() as i32
}
}
#[test]
fn test0072() {
assert_eq!(
Solution::min_distance("horse".to_string(), "ros".to_string()),
3
);
assert_eq!(
Solution::min_distance("intention".to_string(), "execution".to_string()),
5
);
}
|
//! ```cargo
//! [dependencies]
//! serde = { version = "1.0", features = ["derive"] }
//! serde_json = "1.0"
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug)]
struct Point {
x: i32,
y: i32,
}
fn main() {
let point = Point { x: 1, y: 2 };
let serialized = serde_json::to_string(&point).unwrap();
println!("serialized = {}", serialized);
let deserialized: Point = serde_json::from_str(&serialized).unwrap();
println!("deserialized = {:?}", deserialized);
} |
// primitive_types3.rs
// Create an array with at least 100 elements in it where the ??? is.
// Execute `rustlings hint primitive_types3` for hints!
fn main() {
let a: [i32; 105] = [1,2,3,4,5,6,7,8,9,11,12,12,12,12,12,1,2,12,1,2,12,12,1,2,12,1,12,1,2,12,12,1,2,2,2,11,2,121,2,1,2,12,1,2,1,2,12,21,12,1,2,1,2,1,2,12,12,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
if a.len() >= 100 {
println!("Wow, that's a big array!");
} else {
println!("Meh, I eat arrays like that for breakfast.");
}
}
|
extern crate proc_macro;
use proc_macro2::{Ident, Span};
use quote::quote;
use quote::ToTokens;
use syn;
use crate::proc_macro::TokenStream;
#[proc_macro_derive(CRUDEnable)]
pub fn hello_macro_derive(input: TokenStream) -> TokenStream {
// 构建 Rust 代码所代表的语法树
// 以便可以进行操作
let ast = syn::parse(input).unwrap();
// 构建 trait 实现
impl_macro(&ast)
}
///filter id_type
fn find_id_type_ident(arg: &syn::Data) -> Ident {
let mut id_type = Ident::new("String", Span::call_site());
match &arg {
syn::Data::Struct(ref data_struct) => match data_struct.fields {
// field: (0) a: String
syn::Fields::Named(ref fields_named) => {
for (_, field) in fields_named.named.iter().enumerate() {
//println!("named struct field: ({}) {}: {}", index, field_name, field.ty.to_token_stream());
let field_name = format!("{}", field.ident.to_token_stream());
if field_name.eq("id") {
let ty = format!("{}", field.ty.to_token_stream());
let mut inner_type = ty.trim().replace(" ", "").to_string();
if inner_type.starts_with("Option<") {
inner_type = inner_type.trim_start_matches("Option<").trim_end_matches(">").to_string();
}
//println!("id_type from:{}", &inner_type);
id_type = Ident::new(inner_type.as_str(), Span::call_site());
//println!("id_type:{}", &id_type);
break;
}
}
}
syn::Fields::Unnamed(_) => {}
syn::Fields::Unit => {}
},
_ => (),
}
id_type
}
fn impl_macro(ast: &syn::DeriveInput) -> TokenStream {
let name = &ast.ident;
let id_type = find_id_type_ident(&ast.data);
let gen = quote! {
impl CRUDEnable for #name {
//识别的表id字段类型
type IdType = #id_type;
//识别的表名
fn table_name() -> String {
let mut name = stringify!(#name).to_string();
let names: Vec<&str> = name.split("::").collect();
name = names.get(names.len() - 1).unwrap().to_string();
return rbatis::utils::string_util::to_snake_name(&name);
}
}
};
gen.into()
}
|
use std::ptr::NonNull;
use anyhow::*;
use liblumen_alloc::erts::exception::{self, badarity, Exception};
use liblumen_alloc::erts::process::ffi::ErlangResult;
use liblumen_alloc::erts::process::{trace::Trace, FrameWithArguments, Process};
use liblumen_alloc::erts::process::{Frame, Native};
use liblumen_alloc::erts::term::prelude::*;
use liblumen_alloc::{Arity, ModuleFunctionArity};
extern "Rust" {
#[link_name = "lumen_rt_apply_2"]
fn runtime_apply_2(
function_boxed_closure: Boxed<Closure>,
arguments: Vec<Term>,
) -> ErlangResult;
}
#[export_name = "erlang:apply/2"]
pub extern "C-unwind" fn apply_2(function: Term, arguments: Term) -> ErlangResult {
let arc_process = crate::runtime::process::current_process();
match apply_2_impl(&arc_process, function, arguments) {
Ok(result) => result,
Err(exception) => arc_process.return_status(Err(exception)),
}
}
fn apply_2_impl(
process: &Process,
function: Term,
arguments: Term,
) -> exception::Result<ErlangResult> {
let function_boxed_closure: Boxed<Closure> = function
.try_into()
.with_context(|| format!("function ({}) is not a function", function))?;
let argument_vec = argument_list_to_vec(arguments)?;
let arguments_len = argument_vec.len();
let arity = function_boxed_closure.arity() as usize;
if arguments_len == arity {
Ok(unsafe { runtime_apply_2(function_boxed_closure, argument_vec) })
} else {
let mfa = function_boxed_closure.module_function_arity();
let trace = Trace::capture();
trace.set_top_frame(&mfa, argument_vec.as_slice());
let exception = badarity(
process,
function,
arguments,
trace,
Some(
anyhow!(
"arguments ({}) length ({}) does not match arity ({}) of function ({})",
arguments,
arguments_len,
arity,
function
)
.into(),
),
);
Err(Exception::Runtime(exception))
}
}
fn argument_list_to_vec(list: Term) -> exception::Result<Vec<Term>> {
let mut vec = Vec::new();
match list.decode()? {
TypedTerm::Nil => Ok(vec),
TypedTerm::List(boxed_cons) => {
for result in boxed_cons.into_iter() {
match result {
Ok(element) => vec.push(element),
Err(_) => {
return Err(anyhow!(ImproperListError)
.context(format!("arguments ({}) is not a proper list", list)))
.map_err(From::from)
}
}
}
Ok(vec)
}
_ => Err(anyhow!(TypeError)
.context(format!("arguments ({}) is not a list", list))
.into()),
}
}
pub fn frame() -> Frame {
frame_for_native(NATIVE)
}
pub fn frame_for_native(native: Native) -> Frame {
Frame::new(module_function_arity(), native)
}
pub fn module_function_arity() -> ModuleFunctionArity {
ModuleFunctionArity {
module: Atom::from_str("erlang"),
function: Atom::from_str("apply"),
arity: ARITY,
}
}
pub fn frame_with_arguments(function: Term, arguments: Term) -> FrameWithArguments {
frame().with_arguments(false, &[function, arguments])
}
pub const ARITY: Arity = 2;
pub const NATIVE: Native = Native::Two(apply_2);
pub const CLOSURE_NATIVE: Option<NonNull<std::ffi::c_void>> =
Some(unsafe { NonNull::new_unchecked(apply_2 as *mut std::ffi::c_void) });
|
use std::{
cmp::{Ord, Ordering},
collections::BinaryHeap,
};
#[derive(Default, Debug, Eq)]
struct Elf {
total: i64,
snacks: Vec<i64>,
}
impl Elf {
fn add_snack(&mut self, snack: i64) {
self.total += snack;
self.snacks.push(snack);
}
}
impl Ord for Elf {
fn cmp(&self, other: &Self) -> Ordering {
self.total.cmp(&other.total)
}
}
impl PartialOrd for Elf {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl PartialEq for Elf {
fn eq(&self, other: &Self) -> bool {
self.total == other.total
}
}
fn build_elf_heap(input: String) -> BinaryHeap<Elf> {
let mut elves = BinaryHeap::new();
let mut elf = Elf::default();
for snack in input.split('\n') {
if snack.is_empty() {
elves.push(elf);
elf = Elf::default();
continue;
}
elf.add_snack(snack.parse::<i64>().expect("Failed to read calorie count"));
}
elves
}
pub fn part1(input: &str) {
let elves = build_elf_heap(input.to_string());
println!("Number of elves: {}", elves.len());
println!("Part 1: {:?}", elves.peek());
}
pub fn part2(input: &str) {
let mut elves = build_elf_heap(input.to_string());
let mut top3_total = 0;
for _ in 0..3 {
top3_total += elves.pop().unwrap().total;
}
println!("Top 3 Total: {top3_total}");
}
|
use crate::config::PlatformConfiguration;
use crate::errors::*;
use crate::project::Project;
use crate::utils::contains_file_with_ext;
use crate::utils::destructure_path;
use crate::utils::file_has_ext;
use crate::utils::lib_name_from;
use crate::Platform;
use dinghy_build::build_env::append_path_to_target_env;
use dinghy_build::build_env::envify;
use dinghy_build::build_env::set_env_ifndef;
use dinghy_build::utils::path_between;
use dirs::home_dir;
use itertools::Itertools;
use std::fs::create_dir_all;
use std::fs::remove_dir_all;
use std::fs::File;
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use walkdir::WalkDir;
#[derive(Clone, Debug)]
pub enum OverlayScope {
Application,
System,
}
#[derive(Clone, Debug)]
pub struct Overlay {
pub id: String,
pub path: PathBuf,
pub scope: OverlayScope,
}
#[derive(Clone, Debug)]
pub struct Overlayer {
platform_id: String,
rustc_triple: Option<String>,
sysroot: PathBuf,
work_dir: PathBuf,
}
impl Overlayer {
pub fn overlay<P: AsRef<Path>>(
configuration: &PlatformConfiguration,
platform: &dyn Platform,
project: &Project,
sysroot: P,
) -> Result<()> {
let overlayer = Overlayer {
platform_id: platform.id().to_string(),
rustc_triple: Some(platform.rustc_triple().to_string()),
sysroot: sysroot.as_ref().to_path_buf(),
work_dir: project.overlay_work_dir(platform)?,
};
let mut path_to_try = vec![];
let project_path = project.project_dir()?;
let mut current_path = project_path.as_path();
while current_path.parent().is_some() {
path_to_try.push(
current_path
.join(".dinghy")
.join("overlay")
.join(&overlayer.platform_id),
);
if let Some(parent_path) = current_path.parent() {
current_path = parent_path;
} else {
break;
}
}
// Project may be outside home directory. So add it too.
if let Some(dinghy_home_dir) = home_dir().map(|it| {
it.join(".dinghy")
.join("overlay")
.join(&overlayer.platform_id)
}) {
if !path_to_try.contains(&dinghy_home_dir) {
path_to_try.push(dinghy_home_dir)
}
}
overlayer.apply_overlay(
Overlayer::from_conf(configuration)?
.into_iter()
.chain(path_to_try.into_iter().flat_map(|path_to_try| {
Overlayer::from_directory(path_to_try).unwrap_or_default()
}))
.unique_by(|overlay| overlay.id.clone())
.collect_vec(),
)
}
fn from_conf(configuration: &PlatformConfiguration) -> Result<Vec<Overlay>> {
Ok(configuration
.overlays
.as_ref()
.unwrap_or(&::std::collections::HashMap::new())
.into_iter()
.map(|(overlay_id, overlay_conf)| Overlay {
id: overlay_id.to_string(),
path: PathBuf::from(overlay_conf.path.as_str()),
scope: OverlayScope::Application,
})
.collect())
}
fn from_directory<P: AsRef<Path>>(overlay_root_dir: P) -> Result<Vec<Overlay>> {
Ok(overlay_root_dir
.as_ref()
.read_dir()
.with_context(|| {
format!(
"Couldn't read overlay root directory '{}'.",
overlay_root_dir.as_ref().display()
)
})?
.filter_map(|it| it.ok()) // Ignore invalid directories
.map(|it| it.path())
.filter(|it| it.is_dir())
.filter_map(destructure_path)
.map(|(overlay_dir_path, overlay_dir_name)| Overlay {
id: overlay_dir_name,
path: overlay_dir_path.to_path_buf(),
scope: OverlayScope::Application,
})
.collect())
}
fn apply_overlay<I>(&self, overlays: I) -> Result<()>
where
I: IntoIterator<Item = Overlay>,
{
let pkg_config_env_var = self
.rustc_triple
.as_ref()
.map(|_| "PKG_CONFIG_LIBDIR")
// Fallback on PKG_CONFIG_LIBPATH for host as it doesn't erase pkg_config paths
.unwrap_or("PKG_CONFIG_LIBPATH");
// Setup overlay work directory
if let Err(error) = remove_dir_all(&self.work_dir) {
if self.work_dir.exists() {
log::warn!(
"Couldn't cleanup directory overlay work directory {} ({:?})",
self.work_dir.display(),
error
)
}
}
create_dir_all(&self.work_dir).with_context(|| {
format!(
"Couldn't create overlay work directory {}.",
self.work_dir.display()
)
})?;
append_path_to_target_env(
pkg_config_env_var,
self.rustc_triple.as_ref(),
&self.work_dir,
);
for overlay in overlays {
log::debug!("Overlaying '{}'", overlay.id.as_str());
let mut has_pkg_config_files = false;
let pkg_config_path_list = WalkDir::new(&overlay.path)
.into_iter()
.filter_map(|entry| entry.ok()) // Ignore unreadable directories, maybe could warn...
.filter(|entry| entry.file_type().is_dir())
.filter(|dir| {
dir.file_name() == "pkgconfig" || contains_file_with_ext(dir.path(), ".pc")
})
.map(|pkg_config_path| pkg_config_path.path().to_path_buf());
for pkg_config_path in pkg_config_path_list {
log::debug!(
"Discovered pkg-config directory '{}'",
pkg_config_path.display()
);
append_path_to_target_env(
pkg_config_env_var,
self.rustc_triple.as_ref(),
pkg_config_path,
);
has_pkg_config_files = true;
}
if !has_pkg_config_files {
self.generate_pkg_config_file(&overlay)?;
append_path_to_target_env(
pkg_config_env_var,
self.rustc_triple.as_ref(),
&overlay.path,
);
}
// Override the 'prefix' pkg-config variable for the specified overlay only.
set_env_ifndef(
envify(format!("PKG_CONFIG_{}_PREFIX", overlay.id)),
path_between(&self.sysroot, &overlay.path),
);
}
Ok(())
}
fn generate_pkg_config_file(&self, overlay: &Overlay) -> Result<()> {
fn write_pkg_config_file<P: AsRef<Path>, T: AsRef<str>>(
pc_file_path: P,
name: &str,
libs: &[T],
) -> Result<()> {
log::debug!(
"Generating pkg-config pc file {}",
pc_file_path.as_ref().display()
);
let mut pc_file = File::create(pc_file_path)?;
pc_file.write_all(b"prefix:/")?;
pc_file.write_all(b"\nexec_prefix:${prefix}")?;
pc_file.write_all(b"\nName: ")?;
pc_file.write_all(name.as_bytes())?;
pc_file.write_all(b"\nDescription: ")?;
pc_file.write_all(name.as_bytes())?;
pc_file.write_all(b"\nVersion: unspecified")?;
pc_file.write_all(b"\nLibs: -L${prefix} ")?;
for lib in libs {
pc_file.write_all(b" -l")?;
pc_file.write_all(lib.as_ref().as_bytes())?;
}
pc_file.write_all(b"\nCflags: -I${prefix}")?;
Ok(())
}
let pc_file = self.work_dir.join(format!("{}.pc", self.platform_id));
let lib_list = WalkDir::new(&overlay.path)
.max_depth(1)
.into_iter()
.filter_map(|entry| entry.ok()) // Ignore unreadable files, maybe could warn...
.filter(|entry| file_has_ext(entry.path(), ".so"))
.filter_map(|e| lib_name_from(e.path()).ok())
.collect_vec();
write_pkg_config_file(pc_file.as_path(), overlay.id.as_str(), &lib_list).with_context(
|| {
format!(
"Dinghy couldn't generate pkg-config pc file {}",
pc_file.as_path().display()
)
},
)
}
}
|
use crate::prelude::*;
use crate::{Closest, Line, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon};
use num_traits::Float;
use std::iter;
/// Find the closest `Point` between a given geometry and an input `Point`.
/// The closest point may intersect the geometry, be a single
/// point, or be indeterminate, as indicated by the value of the returned enum.
///
/// # Examples
///
/// We have a horizontal line which goes through `(-50, 0) -> (50, 0)`,
/// and want to find the closest point to the point `(0, 100)`.
/// Drawn on paper, the point on the line which is closest to `(0, 100)` is the origin (0, 0).
///
/// ```rust
/// # use geo::algorithm::closest_point::ClosestPoint;
/// # use geo::{Point, Line, Closest};
/// let p: Point<f32> = Point::new(0.0, 100.0);
/// let horizontal_line: Line<f32> = Line::new(Point::new(-50.0, 0.0), Point::new(50.0, 0.0));
///
/// let closest = horizontal_line.closest_point(&p);
/// assert_eq!(closest, Closest::SinglePoint(Point::new(0.0, 0.0)));
/// ```
pub trait ClosestPoint<F: Float, Rhs = Point<F>> {
/// Find the closest point between `self` and `p`.
fn closest_point(&self, p: &Rhs) -> Closest<F>;
}
impl<'a, F, C> ClosestPoint<F> for &'a C
where
C: ClosestPoint<F>,
F: Float,
{
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
(*self).closest_point(p)
}
}
impl<F: Float> ClosestPoint<F> for Point<F> {
fn closest_point(&self, p: &Self) -> Closest<F> {
if self == p {
Closest::Intersection(*self)
} else {
Closest::SinglePoint(*self)
}
}
}
impl<F: Float> ClosestPoint<F> for Line<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
let line_length = self.euclidean_length();
if line_length == F::zero() {
// if we've got a zero length line, technically the entire line
// is the closest point...
return Closest::Indeterminate;
}
// For some line AB, there is some point, C, which will be closest to
// P. The line AB will be perpendicular to CP.
//
// Line equation: P = start + t * (end - start)
let direction_vector = Point(self.end) - Point(self.start);
let to_p = *p - Point(self.start);
let t = to_p.dot(direction_vector) / direction_vector.dot(direction_vector);
// check the cases where the closest point is "outside" the line
if t < F::zero() {
return Closest::SinglePoint(self.start.into());
} else if t > F::one() {
return Closest::SinglePoint(self.end.into());
}
let x = direction_vector.x();
let y = direction_vector.y();
let displacement = Point::new(t * x, t * y);
let c = Point(self.start) + displacement;
if self.contains(p) {
Closest::Intersection(c)
} else {
Closest::SinglePoint(c)
}
}
}
/// A generic function which takes some iterator of points and gives you the
/// "best" `Closest` it can find. Where "best" is the first intersection or
/// the `Closest::SinglePoint` which is closest to `p`.
///
/// If the iterator is empty, we get `Closest::Indeterminate`.
fn closest_of<C, F, I>(iter: I, p: Point<F>) -> Closest<F>
where
F: Float,
I: IntoIterator<Item = C>,
C: ClosestPoint<F>,
{
let mut best = Closest::Indeterminate;
for line_segment in iter {
let got = line_segment.closest_point(&p);
best = got.best_of_two(&best, p);
}
best
}
impl<F: Float> ClosestPoint<F> for LineString<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
closest_of(self.lines(), *p)
}
}
impl<F: Float> ClosestPoint<F> for Polygon<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
let prospectives = self.interiors().iter().chain(iter::once(self.exterior()));
closest_of(prospectives, *p)
}
}
impl<F: Float> ClosestPoint<F> for MultiPolygon<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
closest_of(self.0.iter(), *p)
}
}
impl<F: Float> ClosestPoint<F> for MultiPoint<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
closest_of(self.0.iter(), *p)
}
}
impl<F: Float> ClosestPoint<F> for MultiLineString<F> {
fn closest_point(&self, p: &Point<F>) -> Closest<F> {
closest_of(self.0.iter(), *p)
}
}
#[cfg(test)]
mod tests {
use super::*;
/// Create a test which checks that we get `$should_be` when trying to find
/// the closest distance between `$p` and the line `(0, 0) -> (100, 100)`.
macro_rules! closest {
(intersects: $name:ident, $p:expr) => {
closest!($name, $p => Closest::Intersection($p.into()));
};
($name:ident, $p:expr => $should_be:expr) => {
#[test]
fn $name() {
let line: Line<f32> = Line::from([(0., 0.), (100.0, 100.0)]);
let p: Point<f32> = $p.into();
let should_be: Closest<f32> = $should_be;
let got = line.closest_point(&p);
assert_eq!(got, should_be);
}
};
}
closest!(intersects: start_point, (0.0, 0.0));
closest!(intersects: end_point, (100.0, 100.0));
closest!(intersects: mid_point, (50.0, 50.0));
closest!(in_line_far_away, (1000.0, 1000.0) => Closest::SinglePoint(Point::new(100.0, 100.0)));
closest!(perpendicular_from_50_50, (0.0, 100.0) => Closest::SinglePoint(Point::new(50.0, 50.0)));
fn a_square(width: f32) -> LineString<f32> {
LineString::from(vec![
(0.0, 0.0),
(width, 0.0),
(width, width),
(0.0, width),
(0.0, 0.0),
])
}
/// A bunch of "random" points.
fn random_looking_points() -> Vec<Point<f32>> {
vec![
(0.0, 0.0),
(100.0, 100.0),
(1000.0, 1000.0),
(100.0, 0.0),
(50.0, 50.0),
(1234.567, -987.6543),
]
.into_iter()
.map(Point::from)
.collect()
}
/// Throw a bunch of random points at two `ClosestPoint` implementations
/// and make sure they give identical results.
fn fuzz_two_impls<A, B>(left: A, right: B)
where
A: ClosestPoint<f32>,
B: ClosestPoint<f32>,
{
let some_random_points = random_looking_points();
for (i, random_point) in some_random_points.into_iter().enumerate() {
let p: Point<_> = random_point.into();
let got_from_left = left.closest_point(&p);
let got_from_right = right.closest_point(&p);
assert_eq!(
got_from_left, got_from_right,
"{}: {:?} got {:?} and {:?}",
i, p, got_from_left, got_from_right
);
}
}
#[test]
fn zero_length_line_is_indeterminate() {
let line: Line<f32> = Line::from([(0.0, 0.0), (0.0, 0.0)]);
let p: Point<f32> = Point::new(100.0, 100.0);
let should_be: Closest<f32> = Closest::Indeterminate;
let got = line.closest_point(&p);
assert_eq!(got, should_be);
}
#[test]
fn line_string_with_single_element_behaves_like_line() {
let points = vec![(0.0, 0.0), (100.0, 100.0)];
let line_string = LineString::<f32>::from(points.clone());
let line = Line::new(points[0], points[1]);
fuzz_two_impls(line, line_string);
}
#[test]
fn empty_line_string_is_indeterminate() {
let ls: LineString<f32> = LineString(Vec::new());
let p = Point::new(0.0, 0.0);
let got = ls.closest_point(&p);
assert_eq!(got, Closest::Indeterminate);
}
#[test]
fn simple_polygon_is_same_as_linestring() {
let square: LineString<f32> = a_square(100.0);
let poly = Polygon::new(square.clone(), Vec::new());
fuzz_two_impls(square, poly);
}
/// A polygon with 2 holes in it.
fn holy_polygon() -> Polygon<f32> {
let square: LineString<f32> = a_square(100.0);
let ring_1 = a_square(20.0).translate(20.0, 10.0);
let ring_2 = a_square(10.0).translate(70.0, 60.0);
Polygon::new(square.clone(), vec![ring_1, ring_2])
}
#[test]
fn polygon_without_rings_and_point_outside_is_same_as_linestring() {
let poly = holy_polygon();
let p = Point::new(1000.0, 12345.6789);
assert!(
!poly.exterior().contains(&p),
"`p` should be outside the polygon!"
);
let poly_closest = poly.closest_point(&p);
let exterior_closest = poly.exterior().closest_point(&p);
assert_eq!(poly_closest, exterior_closest);
}
#[test]
fn polygon_with_point_on_interior_ring() {
let poly = holy_polygon();
let p = poly.interiors()[0].0[3];
let should_be = Closest::Intersection(p.into());
let got = poly.closest_point(&p.into());
assert_eq!(got, should_be);
}
#[test]
fn polygon_with_point_near_interior_ring() {
let poly = holy_polygon();
let random_ring_corner = poly.interiors()[0].0[3];
let p = Point(random_ring_corner).translate(-3.0, 3.0);
let should_be = Closest::SinglePoint(random_ring_corner.into());
println!("{:?} {:?}", p, random_ring_corner);
let got = poly.closest_point(&p);
assert_eq!(got, should_be);
}
}
|
extern crate huffman;
use std::env;
use std::fs::File;
use std::io::BufWriter;
use huffman::{compress_file, decompress_file, show_freq_and_dict};
fn main() {
let mut args = env::args();
// generate freq_table and the dict for homework
if args.len() == 2 {
let _ = args.next().unwrap();
let input_file = args.next().unwrap();
show_freq_and_dict(&input_file).unwrap();
}
// compress
if args.len() == 4 {
let _ = args.next().unwrap();
let action = args.next().unwrap();
let input_file = args.next().unwrap();
let output_file = args.next().unwrap();
let mut output = BufWriter::new(File::create(output_file).unwrap());
if action == "-c" {
compress_file(&input_file, &mut output).unwrap();
} else {
decompress_file(&input_file, &mut output).unwrap();
}
}
}
|
use std::{fmt::Display, sync::Arc};
use compactor_scheduler::CompactionJob;
use futures::{stream::BoxStream, StreamExt};
use super::{super::compaction_jobs_source::CompactionJobsSource, CompactionJobStream};
#[derive(Debug)]
pub struct OnceCompactionJobStream<T>
where
T: CompactionJobsSource,
{
source: Arc<T>,
}
impl<T> OnceCompactionJobStream<T>
where
T: CompactionJobsSource,
{
pub fn new(source: T) -> Self {
Self {
source: Arc::new(source),
}
}
}
impl<T> Display for OnceCompactionJobStream<T>
where
T: CompactionJobsSource,
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "once({})", self.source)
}
}
impl<T> CompactionJobStream for OnceCompactionJobStream<T>
where
T: CompactionJobsSource,
{
fn stream(&self) -> BoxStream<'_, CompactionJob> {
let source = Arc::clone(&self.source);
futures::stream::once(async move { futures::stream::iter(source.fetch().await) })
.flatten()
.boxed()
}
}
#[cfg(test)]
mod tests {
use data_types::PartitionId;
use super::{super::super::compaction_jobs_source::mock::MockCompactionJobsSource, *};
#[test]
fn test_display() {
let stream = OnceCompactionJobStream::new(MockCompactionJobsSource::new(vec![]));
assert_eq!(stream.to_string(), "once(mock)");
}
#[tokio::test]
async fn test_stream() {
let ids = vec![
CompactionJob::new(PartitionId::new(1)),
CompactionJob::new(PartitionId::new(3)),
CompactionJob::new(PartitionId::new(2)),
];
let stream = OnceCompactionJobStream::new(MockCompactionJobsSource::new(ids.clone()));
// stream is stateless
for _ in 0..2 {
assert_eq!(stream.stream().collect::<Vec<_>>().await, ids,);
}
}
}
|
extern crate rayon;
extern crate semver;
use self::rayon::prelude::*;
use self::semver::{Version, VersionReq};
use cache::extract_tarball;
use reqwest;
use serde_json;
use std::collections::HashMap;
use Package;
use std::path::PathBuf;
use std::iter::Iterator;
use std::option::Option;
use std::cell::RefCell;
use std::rc::Rc;
#[derive(Deserialize)]
#[derive(Debug, Clone)]
struct RegistryPackage {
name: String,
versions: HashMap<String, RegistryPackageVersion>,
}
#[derive(Deserialize)]
#[derive(Debug, Clone)]
struct RegistryPackageVersion {
name: String,
version: String,
dist: RegistryPackageVersionDist,
dependencies: Option<HashMap<String, String>>,
}
#[derive(Deserialize)]
#[derive(Debug, Clone)]
struct RegistryPackageVersionDist {
// integrity: String,
tarball: String,
}
pub fn refresh(pkg: &Package) {
let root = pkg.root.as_ref().unwrap().clone();
let deps = HashMap::new();
let deps = pkg.dependencies.as_ref().unwrap_or(&deps);
deps.into_par_iter().for_each(|(name, semver_range)| {
let root = root.join("node_modules").join(name);
let metadata = get_metadata(name);
let range = VersionReq::parse(semver_range).unwrap();
let versions: Vec<&String> = metadata.versions.keys().collect();
let version = get_max_compatible_version(&range, &versions);
let m_version = &metadata.versions[&version];
extract_tarball(&m_version.dist.tarball, root, PathBuf::from("tmp").join(name).join(version))
});
}
fn get_metadata(name: &str) -> RegistryPackage {
let url = format!("https://registry.npmjs.org/{}", name);
println!("{:?}", url);
let response = reqwest::get(&url).unwrap();
serde_json::from_reader(response).unwrap()
}
fn get_max_compatible_version(range: &VersionReq, versions: &Vec<&String>) -> String {
let mut versions: Vec<Version> = versions.iter()
.map(|v| Version::parse(v).unwrap())
.filter(|v| range.matches(&v))
.collect();
versions.sort_unstable();
versions.last().unwrap().to_string()
}
fn fetch_all_metadata(name: &str, r: &VersionReq) -> Rc<RefCell<HashMap<String, RegistryPackage>>> {
fn fetch(name: &str, r: &VersionReq, map: Rc<RefCell<HashMap<String, RegistryPackage>>>) {
let m = get_metadata(name);
map.borrow_mut().insert(name.to_owned(), m.clone());
// let m = map.get(name).unwrap().clone();
let versions: Vec<&String> = m.versions.keys().collect();
let latest_version = get_max_compatible_version(&r, &versions);
let versions = m.versions.get(&latest_version).unwrap();
let empty = HashMap::new();
for (n, v) in versions.clone().dependencies.unwrap_or(empty) {
fetch(&n, &VersionReq::parse(&v).unwrap(), map.clone());
}
}
let map = Rc::new(RefCell::new(HashMap::new()));
fetch(name, r, map.clone());
map
}
#[cfg(test)]
mod tests {
use super::*;
use std::fs;
#[test]
fn test_installs_subdeps_4() {
let t = PathBuf::from("fixtures/4-installs-subdeps");
fs::remove_dir_all(t.join("node_modules")).unwrap_or(());
let p = Package::load(&t);
p.refresh();
assert_eq!(Package::load(&t.join("node_modules/edon-test-c")).version, "1.0.4");
assert_eq!(Package::load(&t.join("node_modules/edon-test-a")).version, "0.0.1");
// assert_eq!(Package::load(&t.join("node_modules/edon-test-a/node_modules/edon-test-c")).version, "0.0.0");
}
#[test]
fn test_fetch_all_metadata() {
let m = fetch_all_metadata("edon-test-a", &VersionReq::parse("^0.0.1").unwrap());
for (_, i) in m.borrow().iter() {
println!("{:?}", i.name);
}
assert_eq!(m.borrow().get("edon-test-a").unwrap().versions.get("0.0.0").unwrap().version, "0.0.0");
assert_eq!(m.borrow().get("edon-test-b").unwrap().versions.get("0.0.0").unwrap().version, "0.0.0");
}
}
|
extern crate proc_macro;
extern crate proc_macro2;
use syn::{spanned::Spanned, Ident, TypePath};
macro_rules! or_return_compile_error {
($e:expr) => {
match $e {
Ok(x) => x,
Err(e) => return e.to_compile_error().into(),
}
};
}
mod field;
mod loaded_association;
#[proc_macro]
pub fn field(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
field::expand(input)
}
#[proc_macro]
pub fn loaded_association(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
loaded_association::expand(input)
}
fn inner_most_type_name(ty: &TypePath) -> Result<&Ident> {
let last_segment = ty.path.segments.last();
let segments = last_segment.as_ref().unwrap();
let args = &segments.arguments;
if args.is_empty() {
Ok(&segments.ident)
} else if let syn::PathArguments::AngleBracketed(arguments) = &args {
let last_arg = arguments.args.last().unwrap();
if let syn::GenericArgument::Type(ty) = last_arg {
match ty {
syn::Type::Path(ty_path) => inner_most_type_name(ty_path),
syn::Type::Reference(ty_ref) => {
let elem = &ty_ref.elem;
if let syn::Type::Path(ty) = &**elem {
inner_most_type_name(&ty)
} else {
error(elem, "expected type path")?
}
}
_ => error(ty, "expected type path or reference type")?,
}
} else {
error(last_arg, "expected generic type argument")?
}
} else {
error(
args,
"expected type without arguments or angle bracketed type arguments",
)?
}
}
fn error<T: Spanned, K>(t: T, msg: &str) -> Result<K> {
Err(syn::Error::new(t.span(), msg))
}
type Result<T, E = syn::Error> = std::result::Result<T, E>;
#[cfg(test)]
mod test {
#[allow(unused_imports)]
use super::*;
use quote::ToTokens;
#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.pass("tests/compile_pass/*.rs");
}
#[test]
fn test_inner_most_type() {
let ty = syn::parse_str::<TypePath>("i32").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("i32", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("f64").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("f64", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("String").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("String", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("bool").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("bool", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("Vec<i32>").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("i32", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("Option<Vec<Option<i32>>>").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("i32", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("Option<Vec<Option<i32>>>").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("i32", ty.into_token_stream().to_string());
let ty = syn::parse_str::<TypePath>("Vec<&i32>").unwrap();
let ty = inner_most_type_name(&ty).unwrap();
assert_eq!("i32", ty.into_token_stream().to_string());
}
}
|
use std::rc::Rc;
macro_rules! todo {
() => {
panic!("Unimplemented!")
};
}
pub trait Monoid {
fn mempty() -> Self;
fn mappend(&self, &Self) -> Self;
}
pub trait Measured<V> where V: Monoid {
fn measure(&self) -> V;
}
macro_rules! measure {
( $x:expr ) => {
$x.measure()
};
( $x:expr, $( $y:expr ),* ) => {
$x.measure()
$(
.mappend(&$y.measure())
)*
};
}
enum Digit<A> {
One(A),
Two(A, A),
Three(A, A, A),
Four(A, A, A, A),
}
enum Node<V, A> {
Node2(V, A, A),
Node3(V, A, A, A),
}
#[derive(Clone)]
enum Item<V, A> {
Terminal(A),
Nested(Rc<Node<V, Item<V, A>>>),
}
enum FingerTreeImpl<V, A> {
Empty,
Single(A),
Deep(V, Rc<Digit<A>>, Rc<FingerTreeImpl<V, A>>, Rc<Digit<A>>),
}
enum ViewLImpl<V, A> {
EmptyL,
ConsL(A, FingerTreeImpl<V, A>),
}
pub struct FingerTree<V, A>(FingerTreeImpl<V, Item<V, A>>);
pub enum ViewL<V, A> {
EmptyL,
ConsL(A, FingerTree<V, A>),
}
use Digit::{One, Two, Three, Four};
use Node::{Node2, Node3};
use Item::{Terminal, Nested};
use FingerTreeImpl::{Empty, Single, Deep};
impl<V, A> From<Node<V, Item<V, A>>> for Item<V, A> {
fn from(n: Node<V, Item<V, A>>) -> Item<V, A> {
Nested(Rc::new(n))
}
}
trait Foldable {
type Item;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B;
fn fold_map<A>(&self, f: &Fn(&Self::Item) -> A) -> A
where A: Monoid
{
self.foldr(A::mempty(), &|a, b| a.mappend(&f(b)))
}
}
impl<A> Foldable for Digit<A> {
type Item = A;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B {
match *self {
One(ref a) => f(zero, a),
Two(ref a, ref b) => f(f(zero, a), b),
Three(ref a, ref b, ref c) => f(f(f(zero, a), b), c),
Four(ref a, ref b, ref c, ref d) => f(f(f(f(zero, a), b), c), d),
}
}
}
impl<V, A> Foldable for Node<V, A> {
type Item = A;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B {
match *self {
Node2(_, ref a, ref b) => f(f(zero, a), b),
Node3(_, ref a, ref b, ref c) => f(f(f(zero, a), b), c),
}
}
}
impl<V, A> Foldable for Item<V, A> {
type Item = A;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B {
match *self {
Terminal(ref a) => f(zero, a),
Nested(ref n) => n.foldr(zero, &|a, b| b.foldr(a, &f)),
}
}
}
impl<V, A> Foldable for FingerTreeImpl<V, Item<V, A>> {
type Item = A;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B {
match *self {
Empty => zero,
Single(ref i) => i.foldr(zero, f),
Deep(_, ref pr, ref m, ref sf) => {
let a = pr.foldr(zero, &|a, i| i.foldr(a, f));
let b = m.foldr(a, f);
let c = sf.foldr(b, &|a, i| i.foldr(a, f));
c
}
}
}
}
impl<V, A> Measured<V> for Digit<A>
where V: Monoid,
A: Measured<V>
{
fn measure(&self) -> V {
self.fold_map(&A::measure)
}
}
impl<V, A> Measured<V> for Node<V, A>
where V: Clone + Monoid,
A: Measured<V>
{
fn measure(&self) -> V {
match *self {
Node2(ref v, _, _) |
Node3(ref v, _, _, _) => v.clone(),
}
}
}
impl<V, A> Measured<V> for Item<V, A>
where V: Clone + Monoid,
A: Measured<V>
{
fn measure(&self) -> V {
match *self {
Terminal(ref a) => a.measure(),
Nested(ref n) => n.measure(),
}
}
}
impl<V, A> Measured<V> for FingerTreeImpl<V, A>
where V: Clone + Monoid,
A: Measured<V>
{
fn measure(&self) -> V {
match *self {
Empty => V::mempty(),
Single(ref i) => i.measure(),
Deep(ref v, _, _, _) => v.clone(),
}
}
}
impl<V, A> Measured<V> for FingerTree<V, A>
where V: Clone + Monoid,
A: Measured<V>
{
fn measure(&self) -> V {
self.0.measure()
}
}
impl<'a, V, A> From<&'a Digit<A>> for FingerTreeImpl<V, A>
where V: Clone + Monoid,
A: Clone + Measured<V>
{
fn from(d: &'a Digit<A>) -> FingerTreeImpl<V, A> {
match *d {
One(ref a) => Single(a.clone()),
Two(ref a, ref b) => FingerTreeImpl::deep(One(a.clone()), Empty, One(b.clone())),
Three(ref a, ref b, ref c) => {
FingerTreeImpl::deep(Two(a.clone(), b.clone()), Empty, One(c.clone()))
}
Four(ref a, ref b, ref c, ref d) => {
FingerTreeImpl::deep(Two(a.clone(), b.clone()), Empty, Two(c.clone(), d.clone()))
}
}
}
}
impl<'a, V, A> From<&'a Node<V, A>> for Digit<A> where A: Clone
{
fn from(n: &'a Node<V, A>) -> Digit<A> {
match *n {
Node2(_, ref a, ref b) => Two(a.clone(), b.clone()),
Node3(_, ref a, ref b, ref c) => Three(a.clone(), b.clone(), c.clone()),
}
}
}
impl<V, A> From<Item<V, A>> for Digit<Item<V, A>>
where V: Clone,
A: Clone
{
fn from(item: Item<V, A>) -> Digit<Item<V, A>> {
match item {
Nested(n) => (&(*n)).into(),
Terminal(..) => unreachable!(),
}
}
}
impl<A> Digit<A> where A: Clone
{
fn cons(&self, a: A) -> Digit<A> {
match *self {
One(ref b) => Two(a, b.clone()),
Two(ref b, ref c) => Three(a, b.clone(), c.clone()),
Three(ref b, ref c, ref d) => Four(a, b.clone(), c.clone(), d.clone()),
Four(..) => unreachable!(),
}
}
fn head(&self) -> A {
match *self {
One(ref a) |
Two(ref a, _) |
Three(ref a, _, _) |
Four(ref a, _, _, _) => a.clone(),
}
}
fn tail(&self) -> Digit<A> {
match *self {
One(_) => unreachable!(),
Two(_, ref a) => One(a.clone()),
Three(_, ref a, ref b) => Two(a.clone(), b.clone()),
Four(_, ref a, ref b, ref c) => Three(a.clone(), b.clone(), c.clone()),
}
}
}
impl<V, A> Node<V, A>
where V: Clone + Monoid,
A: Measured<V>
{
fn node3(a: A, b: A, c: A) -> Node<V, A> {
Node3(measure!(a, b, c), a, b, c)
}
}
impl<V, A> FingerTreeImpl<V, A>
where V: Clone + Monoid,
A: Clone + Measured<V>
{
fn deep<P, M, S>(pr: P, m: M, sf: S) -> FingerTreeImpl<V, A>
where P: Into<Rc<Digit<A>>>,
M: Into<Rc<FingerTreeImpl<V, A>>>,
S: Into<Rc<Digit<A>>>
{
let pr = pr.into();
let m = m.into();
let sf = sf.into();
Deep(measure!(pr, m, sf), pr, m, sf)
}
fn cons<I>(&self, a: I) -> FingerTreeImpl<V, A>
where I: Into<A>,
A: From<Node<V, A>>
{
let a = a.into();
match *self {
Empty => Single(a),
Single(ref b) => FingerTreeImpl::deep(One(a), Empty, One(b.clone())),
Deep(_, ref pr, ref m, ref sf) => {
match **pr {
Four(ref b, ref c, ref d, ref e) => {
FingerTreeImpl::deep(Two(a, b.clone()),
m.cons(Node::node3(c.clone(), d.clone(), e.clone())),
sf.clone())
}
_ => FingerTreeImpl::deep(pr.cons(a), m.clone(), sf.clone()),
}
}
}
}
fn viewl(&self) -> ViewLImpl<V, A>
where A: Into<Digit<A>>
{
match *self {
Empty => ViewLImpl::EmptyL,
Single(ref i) => ViewLImpl::ConsL(i.clone(), Empty),
Deep(_, ref pr, ref m, ref sf) => {
match **pr {
One(ref x) => ViewLImpl::ConsL(x.clone(), m.rotl(sf)),
_ => {
ViewLImpl::ConsL(pr.head(),
FingerTreeImpl::deep(pr.tail(), m.clone(), sf.clone()))
}
}
}
}
}
fn rotl(&self, sf: &Rc<Digit<A>>) -> FingerTreeImpl<V, A>
where A: Into<Digit<A>>
{
match self.viewl() {
ViewLImpl::EmptyL => (&(**sf)).into(),
ViewLImpl::ConsL(a, m) => {
Deep(measure!(self, sf),
Rc::new(a.into()),
Rc::new(m),
sf.clone())
}
}
}
}
impl<V, A> FingerTree<V, A>
where V: Clone + Monoid,
A: Clone + Measured<V>
{
pub fn empty() -> FingerTree<V, A> {
FingerTree(Empty)
}
pub fn cons(&self, a: A) -> FingerTree<V, A> {
FingerTree(self.0.cons(Terminal(a)))
}
pub fn viewl(&self) -> ViewL<V, A> {
match self.0.viewl() {
ViewLImpl::EmptyL => ViewL::EmptyL,
ViewLImpl::ConsL(Terminal(a), s) => ViewL::ConsL(a, FingerTree(s)),
_ => unreachable!(),
}
}
}
impl<V, A> Foldable for FingerTree<V, A> {
type Item = A;
fn foldr<B>(&self, zero: B, f: &Fn(B, &Self::Item) -> B) -> B {
self.0.foldr(zero, f)
}
}
#[cfg(test)]
#[derive(Clone, Debug, Eq, PartialEq)]
struct Sum(usize);
#[cfg(test)]
impl Monoid for Sum {
fn mempty() -> Self {
Sum(0)
}
fn mappend(&self, other: &Self) -> Self {
Sum(self.0 + other.0)
}
}
#[cfg(test)]
impl Measured<Sum> for Sum {
fn measure(&self) -> Sum {
Sum(self.0)
}
}
#[cfg(test)]
impl Measured<Sum> for String {
fn measure(&self) -> Sum {
Sum(self.len())
}
}
#[test]
fn measure_macro_works() {
assert_eq!(Sum(10), measure!(Sum(1), Sum(2), Sum(3), Sum(4)));
}
#[test]
fn fingertree_foldr_works() {
let mut tree = FingerTree::empty();
for i in 0..10000 {
tree = tree.cons(Sum(i));
}
assert_eq!(10000, tree.foldr(0, &|a, _| a + 1));
}
#[test]
fn fingertree_strings_measure() {
let mut tree = FingerTree::empty();
for _ in 0..10000 {
tree = tree.cons("Hello world!".to_string());
}
assert_eq!(Sum("Hello world!".len() * 10000), measure!(tree));
}
#[test]
fn fingertree_strings_reconstruction() {
let mut expected = String::new();
let mut tree = FingerTree::empty();
for _ in 0..10000 {
tree = tree.cons("Hello world!".to_string());
expected = expected + &"Hello world!".to_string();
}
let reconstructed = tree.foldr(String::new(), &|s, t| s + t);
assert_eq!(expected, reconstructed);
}
|
use std::io;
use std::fmt;
/// Generic error used accross the libary.
/// Wraps around other errors for genericity.
///
/// Used by Result in main.rs. `use` super::Result
/// and the rest should work like magic.
#[derive(Debug)]
pub enum BenvError {
SplitError(&'static str),
IO(io::Error),
MissingProgram
}
impl From<io::Error> for BenvError {
fn from(error: io::Error) -> BenvError {
BenvError::IO(error)
}
}
impl fmt::Display for BenvError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BenvError::IO(ref err) => write!(f, "IO error: {}", err),
BenvError::SplitError(ref err) => write!(f, "Split error: {}", err),
BenvError::MissingProgram => write!(f, "Missing program")
}
}
}
|
// membolehkan kode yg tak terpakai tanpa ada peringatan
// ada 2 cara:
// 1. #[allow(dead_code)]
// menon-aktifkan kode tak terpakai untuk setiap fungsi. setiap fungsi
// harus ditambahkan jika tidak ingin ada peringatan.
// 2. #![allow(dead_code)]
// menon-aktifkan kode tak terpakai secara menyeluruh, tidak harus per fungsi.
// (perhatikan tanda !)
// untuk menon-aktifkan peringatan jika variable yg tak terpakai gunakan
// #![allow(unused_variables)]
#![allow(dead_code)]
#![allow(unused_variables)]
fn main() {
let a = 10;
let b = 20;
println!("{}", b);
}
fn hello() {
println!("Hello world!");
} |
//! Helper struct to build a `Function`.
use crate::device::Device;
use crate::helper::{AutoOperand, LogicalDim, MetaStatement, TilingPattern};
use crate::ir::{self, op, Parameter, Type};
use crate::ir::{AccessPattern, Function, InstId, Operand, Operator, Signature};
use crate::search_space::{Action, DimKind, InstFlag, MemSpace, Order, SearchSpace};
use fxhash::FxHashMap;
use itertools::Itertools;
use log::debug;
use std::borrow::Borrow;
use std::sync::Arc;
use utils::*;
/// Helper to build a `Function`.
pub struct Builder {
function: Function<()>,
open_dims: FxHashMap<ir::DimId, ir::DimId>,
actions: Vec<Action>,
}
impl Builder {
/// Creates a new `Builder` for a `Function` with the given signature.
pub fn new(signature: Arc<Signature>, device: Arc<dyn Device>) -> Builder {
Builder {
function: Function::new(signature, device),
open_dims: FxHashMap::default(),
actions: Vec::new(),
}
}
/// Returns the function created by the builder
pub fn get(self) -> SearchSpace {
debug!("{:?}", self.actions);
SearchSpace::new(self.function, self.actions).expect("invalid IR instance")
}
/// Returns the function created by the builder
pub fn get_clone(&self) -> SearchSpace {
let function = self.function.clone();
SearchSpace::new(function, self.actions.clone()).expect("invalid IR instance")
}
/// Returns an operand from an `AutoOperand`.
fn get_op(&mut self, op: &dyn AutoOperand) -> Operand<()> {
op.get(self)
}
/// Creates a binary operator.
pub fn binop(
&mut self,
op: ir::BinOp,
lhs: &dyn AutoOperand,
rhs: &dyn AutoOperand,
) -> InstId {
let lhs_op = self.get_op(lhs);
let rhs_op = self.get_op(rhs);
let rounding = default_rounding(lhs_op.t());
self.inst(op::BinOp(op, lhs_op, rhs_op, rounding))
}
/// Adds an `Add` instruction to the fuction.
pub fn add(&mut self, lhs: &dyn AutoOperand, rhs: &dyn AutoOperand) -> InstId {
self.binop(ir::BinOp::Add, lhs, rhs)
}
/// Adds a `Sub` instruction to the function.
pub fn sub(&mut self, lhs: &dyn AutoOperand, rhs: &dyn AutoOperand) -> InstId {
self.binop(ir::BinOp::Sub, lhs, rhs)
}
/// Adds a `Mul` instruction to the function. Defaults to low mode.
pub fn mul(&mut self, lhs: &dyn AutoOperand, rhs: &dyn AutoOperand) -> InstId {
let lhs_op = self.get_op(lhs);
let rhs_op = self.get_op(rhs);
let t = lhs_op.t();
let rounding = default_rounding(t);
self.inst(op::Mul(lhs_op, rhs_op, rounding, t))
}
/// Adds a 'Mul` instruction with a wide mode to the function.
pub fn mul_ex(
&mut self,
lhs: &dyn AutoOperand,
rhs: &dyn AutoOperand,
t: Type,
) -> InstId {
let lhs_op = self.get_op(lhs);
let rhs_op = self.get_op(rhs);
let rounding = default_rounding(t);
let op = op::Mul(lhs_op, rhs_op, rounding, t);
self.inst(op)
}
/// Adds a `Mad` or `Fma` instruction to the function. Defaults to low or wide mode
/// depending on the operand types.
pub fn mad(
&mut self,
mul_lhs: &dyn AutoOperand,
mul_rhs: &dyn AutoOperand,
add_rhs: &dyn AutoOperand,
) -> InstId {
let mul_lhs_op = self.get_op(mul_lhs);
let mul_rhs_op = self.get_op(mul_rhs);
let add_rhs_op = self.get_op(add_rhs);
let rounding = default_rounding(mul_lhs_op.t());
let op = op::Mad(mul_lhs_op, mul_rhs_op, add_rhs_op, rounding);
self.inst(op)
}
/// Adds a `Max` instruction to the fuction.
pub fn max(&mut self, lhs: &dyn AutoOperand, rhs: &dyn AutoOperand) -> InstId {
let lhs_op = self.get_op(lhs);
let rhs_op = self.get_op(rhs);
let rounding = op::Rounding::Exact;
let op = ir::BinOp::Max;
self.inst(op::BinOp(op, lhs_op, rhs_op, rounding))
}
/// Adds a `Div` instruction to the fuction.
pub fn div(&mut self, lhs: &dyn AutoOperand, rhs: &dyn AutoOperand) -> InstId {
self.binop(ir::BinOp::Div, lhs, rhs)
}
/// Adds a `Mov` instruction to the function.
pub fn mov(&mut self, arg: &dyn AutoOperand) -> InstId {
let arg_op = self.get_op(arg);
self.inst(op::UnaryOp(ir::UnaryOp::Mov, arg_op))
}
/// Adds an `Exp` instruction to the function.
pub fn exp(&mut self, arg: &dyn AutoOperand) -> InstId {
let arg_op = self.get_op(arg);
let t = arg_op.t();
self.inst(op::UnaryOp(ir::UnaryOp::Exp(t), arg_op))
}
/// Adds a coherent load from global memory instruction to the function.
pub fn ld(
&mut self,
ret_type: Type,
addr: &dyn AutoOperand,
pattern: AccessPattern,
) -> InstId {
self.ld_ex(ret_type, addr, pattern, InstFlag::COHERENT)
}
/// Adds a non-coherent load from global memory instruction to the function.
pub fn ld_nc(
&mut self,
ret_type: Type,
addr: &dyn AutoOperand,
pattern: AccessPattern,
) -> InstId {
self.ld_ex(ret_type, addr, pattern, InstFlag::ALL)
}
/// Adds a load instruction with the given flags and memory block.
pub fn ld_ex(
&mut self,
ret_type: Type,
addr: &dyn AutoOperand,
pattern: AccessPattern,
flags: InstFlag,
) -> InstId {
let addr_op = self.get_op(addr);
let inst_id = self.inst(op::Ld(ret_type, addr_op, pattern));
self.actions.push(Action::InstFlag(inst_id, flags));
inst_id
}
/// Adds a store instruction.
pub fn st(
&mut self,
addr: &dyn AutoOperand,
val: &dyn AutoOperand,
pattern: AccessPattern,
) -> InstId {
self.st_ex(addr, val, true, pattern, InstFlag::ALL)
}
/// Adds a store instruction with the given flags and memory block.
pub fn st_ex(
&mut self,
addr: &dyn AutoOperand,
val: &dyn AutoOperand,
side_effect: bool,
pattern: AccessPattern,
flags: InstFlag,
) -> InstId {
let addr_op = self.get_op(addr);
let val_op = self.get_op(val);
let inst_id = self.inst(op::St(addr_op, val_op, side_effect, pattern));
self.actions.push(Action::InstFlag(inst_id, flags));
inst_id
}
/// Adds a cast instruction to the given type.
pub fn cast(&mut self, val: &dyn AutoOperand, t: Type) -> InstId {
let val_op = self.get_op(val);
self.inst(op::UnaryOp(ir::UnaryOp::Cast(t), val_op))
}
/// Restricts the order between two basic blocks. Does not restricts LINK and NPACK
/// flags.
pub fn order(
&mut self,
lhs: &dyn MetaStatement,
rhs: &dyn MetaStatement,
order: Order,
) {
for lhs in lhs.borrow().ids() {
for rhs in rhs.borrow().ids() {
self.action(Action::Order(lhs, rhs, order));
}
}
}
/// Inserts an instruction in the function.
fn inst(&mut self, op: Operator<()>) -> InstId {
let open_dims = self.open_dims.iter().map(|(&x, _)| x).collect();
unwrap!(self.function.add_inst(op, open_dims))
}
/// Returns the variable holding the result of an instruction. Creates it if
/// necessary.
pub fn get_inst_variable(&mut self, inst_id: InstId) -> ir::VarId {
self.function
.inst(inst_id)
.result_variable()
.unwrap_or_else(|| {
unwrap!(self.function.add_variable(ir::VarDef::Inst(inst_id)))
})
}
/// Creates a new variable that takes the last value of another variable produced in
/// a loop nest.
pub fn create_last_variable(
&mut self,
var: ir::VarId,
logical_dims: &[&LogicalDim],
) -> ir::VarId {
let dims = logical_dims.iter().cloned().flatten().collect();
self.function
.add_variable(ir::VarDef::Last(var, dims))
.unwrap()
}
/// Creates a new variable that takes point-to-point the value of another variable, in
/// another loop nest.
pub fn create_dim_map_variable(
&mut self,
var: ir::VarId,
logical_mapping: &[(&LogicalDim, &LogicalDim)],
) -> ir::VarId {
let mapping = logical_mapping
.iter()
.flat_map(|&(lhs, rhs)| lhs.iter().zip_eq(rhs))
.map(|(lhs, rhs)| self.function.map_dimensions([lhs, rhs]))
.collect();
self.function
.add_variable(ir::VarDef::DimMap(var, mapping))
.unwrap()
}
/// Applies an action on the function.
pub fn action(&mut self, action: Action) {
self.actions.push(action)
}
/// Opens a new dimension.
pub fn open_dim(&mut self, size: ir::Size) -> LogicalDim {
self.open_tiled_dim(size, TilingPattern::default())
}
/// Opens a nest of new dimension with the given kinds and sizes.
pub fn open_dim_ex(&mut self, size: ir::Size, kind: DimKind) -> LogicalDim {
let dim = self.open_dim(size);
self.actions.push(Action::DimKind(dim[0], kind));
dim
}
/// Open multiple dimensions to represent a tiled dimension.
pub fn open_tiled_dim(
&mut self,
size: ir::Size,
tiling_pattern: TilingPattern,
) -> LogicalDim {
let (logical_id, real_ids) = unwrap!(self.function.add_logical_dim(
size,
tiling_pattern.tiling_factors.clone(),
tiling_pattern.tile_sizes.clone(),
));
self.open_dims.extend(real_ids.iter().map(|&id| (id, id)));
LogicalDim {
logical_id,
real_ids,
tiling_pattern,
}
}
/// Opens a new dimension mapped to an existing one.
///
/// The size of the new dim is inherited from the mapped dim.
/// The dimension mapped to is closed if needed.
pub fn open_mapped_dim(&mut self, old_dim: &LogicalDim) -> LogicalDim {
let size = self.function.logical_dim(old_dim.id()).total_size().clone();
let (new_id, new_dims) = unwrap!(self.function.add_logical_dim(
size.clone(),
old_dim.tiling_pattern.tiling_factors.clone(),
old_dim.tiling_pattern.tile_sizes.clone(),
));
for (old, &new) in old_dim.iter().zip_eq(&new_dims) {
self.open_dims.remove(&old);
self.open_dims.insert(new, old);
}
LogicalDim {
logical_id: new_id,
real_ids: new_dims,
tiling_pattern: old_dim.tiling_pattern.clone(),
}
}
/// Opens an existing dimension.
pub fn reopen_dim(&mut self, dim: &LogicalDim) {
for id in dim.iter() {
self.open_dims.insert(id, id);
}
}
/// Opens an existing dimension and maps it to another one.
/// The dimension mapped to is closed if needed.
pub fn reopen_mapped_dim(&mut self, dim: &LogicalDim, mapped_to: &LogicalDim) {
for (dim, mapped_to) in dim.iter().zip_eq(mapped_to) {
self.open_dims.remove(&mapped_to);
self.open_dims.insert(dim, mapped_to);
}
}
/// Closes a dimension.
pub fn close_dim(&mut self, dims: &LogicalDim) {
for dim in dims {
assert!(self.open_dims.remove(&dim).is_some());
}
}
/// Returns a constant size.
pub fn cst_size(&self, size: u32) -> ir::Size {
ir::Size::new_const(size)
}
/// Returns a parameter size.
pub fn param_size(&self, param: &str, max_size: u32) -> ir::Size {
ir::Size::new_param(Arc::clone(self.find_param(param)), max_size)
}
/// Allocates a memory block in shared memory.
pub fn allocate_shared(&mut self, size: u32) -> ir::MemId {
let id = self.allocate(size, true);
self.actions.push(Action::MemSpace(id, MemSpace::SHARED));
id
}
/// Allocates a memory block.
pub fn allocate(&mut self, size: u32, private: bool) -> ir::MemId {
assert!(
private,
"allocating non-private memory is not yet supported"
);
self.function.add_mem_block(size)
}
/// Builds both an induction variable for a tensor memory access and the corresponding
/// access pattern.
pub fn tensor_access(
&mut self,
addr: &dyn AutoOperand,
mem_id: Option<ir::MemId>,
t: ir::Type,
dims: &[&LogicalDim],
) -> (ir::IndVarId, ir::AccessPattern) {
let base = self.get_op(addr);
let logical_increments = self.tensor_increments(t, dims);
let increments = self.logical_to_real_increments(logical_increments);
let dims = increments.iter().cloned().collect();
let ind_var = unwrap!(ir::InductionVar::new(increments, base));
let ind_var_id = self.function.add_ind_var(ind_var);
(ind_var_id, AccessPattern::Tensor { mem_id, dims })
}
/// Generates the access pattern corresponding to accessing a tensor of the given
/// type.
pub fn tensor_access_pattern(
&self,
mem: Option<ir::MemId>,
increments: Vec<(&LogicalDim, ir::Size)>,
) -> AccessPattern {
let dims = self.logical_to_real_increments(increments);
AccessPattern::Tensor {
mem_id: mem,
dims: dims.into_iter().collect(),
}
}
/// Builds an induction variable.
pub fn induction_var(
&mut self,
base: &dyn AutoOperand,
dims: Vec<(&LogicalDim, ir::Size)>,
) -> ir::IndVarId {
let base = self.get_op(base);
let dims = self.logical_to_real_increments(dims);
self.function
.add_ind_var(unwrap!(ir::InductionVar::new(dims, base)))
}
/// Converts increments on logical dimensions to increment on real dimensions.
fn logical_to_real_increments(
&self,
increments: Vec<(&LogicalDim, ir::Size)>,
) -> Vec<(ir::DimId, ir::PartialSize)> {
increments
.into_iter()
.flat_map(|(dim, size)| {
let mut size: ir::PartialSize = size.into();
// `dimensions()` returns the dimensions from inner-most to outer-most, but we want
// them from outer-most to inner-most for display. Note that we don't otherwise
// depend on the order of the increments; they are only used as a DimId ->
// PartialSize mapping.
self.function
.logical_dim(dim.id())
.dimensions()
.map(move |dim| {
let increment = size.clone();
size *= self.function.dim(dim).size();
(dim, increment)
})
.collect::<Vec<_>>()
.into_iter()
.rev()
})
.collect()
}
/// Returns the list of increment to access an n-dimensional tensor.
fn tensor_increments<'b>(
&self,
t: ir::Type,
dims: &[&'b LogicalDim],
) -> Vec<(&'b LogicalDim, ir::Size)> {
let data_size = ir::Size::new_const(unwrap!(t.len_byte()));
dims.iter()
.rev()
.scan(data_size, |size, &dim| {
let increment = size.clone();
*size *= self.function.logical_dim(dim.id()).total_size();
Some((dim, increment))
})
.collect()
}
/// Creates a dim-map operand.
pub fn dim_map(
&self,
base: ir::InstId,
dim_map: &[(&LogicalDim, &LogicalDim)],
scope: ir::DimMapScope<()>,
) -> ir::Operand<()> {
let dim_map = dim_map
.iter()
.flat_map(|&(lhs, rhs)| lhs.iter().zip_eq(rhs.iter()));
let inst = self.function.inst(base);
ir::Operand::new_inst(inst, ir::DimMap::new(dim_map), scope)
}
/// Finds a paramter given its name.
pub fn find_param(&self, param: &str) -> &Arc<Parameter> {
unwrap!(self
.function
.signature()
.params
.iter()
.find(|p| p.name == param))
}
/// Returns a reference to the function being built.
pub fn function(&self) -> &ir::Function<()> {
&self.function
}
/// Returns the list of open dimensions with the dimensions they are mapped to.
pub(super) fn open_dims(&self) -> impl Iterator<Item = (ir::DimId, ir::DimId)> + '_ {
self.open_dims.iter().map(|(&new, &old)| (new, old))
}
}
/// Returns the default rounding for a given operand type.
fn default_rounding(t: Type) -> op::Rounding {
if t.is_integer() {
op::Rounding::Exact
} else {
op::Rounding::Nearest
}
}
|
use rayon::prelude::*;
use std::collections::HashSet;
type Asteroid = (i32, i32);
type AsteroidField = Vec<Asteroid>;
struct Quadrants {
ne_quadrant: AsteroidField,
se_quadrant: AsteroidField,
sw_quadrant: AsteroidField,
nw_quadrant: AsteroidField,
}
fn parse_asteroids(input: &'static str) -> AsteroidField {
input
.lines()
.enumerate()
.flat_map(|(y, l)| {
l.chars().enumerate().filter_map(move |(x, c)| {
if c == '#' {
Some((x as i32, y as i32))
} else {
None
}
})
})
.collect()
}
fn get_angle(from: &Asteroid, to: &Asteroid) -> i64 {
(((to.1 - from.1) as f32)
.atan2((to.0 - from.0) as f32)
.to_degrees()
* 100.0) as i64
}
fn get_num_unique_collision_angles(asteroids: &AsteroidField) -> Vec<usize> {
asteroids
.par_iter()
.map(|a| {
let mut angle_set = HashSet::new();
for other_a in asteroids {
if a != other_a {
angle_set.insert(get_angle(a, other_a));
}
}
angle_set.len()
})
.collect()
}
fn get_best_location_and_count(asteroids: &AsteroidField) -> ((i32, i32), usize) {
let collision_angles = get_num_unique_collision_angles(asteroids);
let (idx, max) = collision_angles
.iter()
.enumerate()
.max_by_key(|(_, angle)| *angle)
.unwrap();
(asteroids[idx], *max)
}
fn get_dist(from: &Asteroid, to: &Asteroid) -> i32 {
(to.0 - from.0).abs() + (to.1 - from.1).abs()
}
fn split_into_quadrants(from: &Asteroid, asteroids: &AsteroidField) -> Quadrants {
//order by distance from point
let mut ordered_roids = asteroids.clone();
ordered_roids.sort_by(|a, b| get_dist(from, &a).cmp(&get_dist(from, &b)));
Quadrants {
ne_quadrant: ordered_roids
.clone()
.into_iter()
.filter(|(x, y)| x >= &from.0 && y < &from.1)
.collect(),
se_quadrant: ordered_roids
.clone()
.into_iter()
.filter(|(x, y)| x >= &from.0 && y >= &from.1)
.collect(),
sw_quadrant: ordered_roids
.clone()
.into_iter()
.filter(|(x, y)| x < &from.0 && y >= &from.1)
.collect(),
nw_quadrant: ordered_roids
.clone()
.into_iter()
.filter(|(x, y)| x < &from.0 && y < &from.1)
.collect(),
}
}
fn sweep_quadrant(from: &Asteroid, quadrant: &AsteroidField) -> Vec<Asteroid> {
let mut hit_angles = HashSet::new();
let mut hit_asteroids: Vec<(Asteroid, i64)> = vec![];
for to in quadrant {
if to != from {
let hit_angle = get_angle(from, to);
if hit_angles.insert(hit_angle) {
hit_asteroids.push((*to, hit_angle))
}
}
}
hit_asteroids.sort_by(|a, b| a.1.cmp(&b.1));
hit_asteroids.iter().map(|roid| roid.0).collect()
}
fn sweep_laser_hits(from: &Asteroid, asteroids: &AsteroidField) -> Vec<Asteroid> {
let quadrants = split_into_quadrants(from, asteroids);
let ne_hits = sweep_quadrant(from, &quadrants.ne_quadrant);
let se_hits = sweep_quadrant(from, &quadrants.se_quadrant);
let sw_hits = sweep_quadrant(from, &quadrants.sw_quadrant);
let nw_hits = sweep_quadrant(from, &quadrants.nw_quadrant);
[
ne_hits.as_slice(),
se_hits.as_slice(),
sw_hits.as_slice(),
nw_hits.as_slice(),
]
.concat()
}
fn find_nth_destroyed_asteroid(
laser_roid: &Asteroid,
in_field: &AsteroidField,
nth: usize,
) -> Asteroid {
let mut destruction_field = in_field.clone();
let mut destroyed_roids = vec![];
while destroyed_roids.len() < nth {
if in_field.is_empty() {
unreachable!();
}
let mut hit_roids = sweep_laser_hits(laser_roid, &destruction_field);
//remove any hit asteroids from the field
destruction_field = destruction_field
.into_iter()
.filter(|roid| hit_roids.contains(roid))
.collect();
destroyed_roids.append(&mut hit_roids);
}
destroyed_roids[nth - 1]
}
fn main() {
let asteroids = parse_asteroids(include_str!("../input/day_10.txt"));
let best = get_best_location_and_count(&asteroids);
println!("Part 1 => {} at {:?}", best.1, best.0);
let found_vaporised_roid = find_nth_destroyed_asteroid(&best.0, &asteroids, 200);
println!("Vaporised roid is {:?}", found_vaporised_roid);
println!(
"Part 2 => {}",
(found_vaporised_roid.0 * 100) + found_vaporised_roid.1
);
}
#[test]
fn simple() {
let asteroids = ".#..#
.....
#####
....#
...##";
assert_eq!(
((3, 4), 8),
get_best_location_and_count(&parse_asteroids(asteroids))
);
}
#[test]
fn case_1() {
assert_eq!(
((5, 8), 33),
get_best_location_and_count(&parse_asteroids(include_str!("../input/test_1.txt")))
);
}
#[test]
fn case_2() {
assert_eq!(
((1, 2), 35),
get_best_location_and_count(&parse_asteroids(include_str!("../input/test_2.txt")))
);
}
#[test]
fn case_3() {
assert_eq!(
((6, 3), 41),
get_best_location_and_count(&parse_asteroids(include_str!("../input/test_3.txt")))
);
}
#[test]
fn case_4() {
assert_eq!(
((11, 13), 210),
get_best_location_and_count(&parse_asteroids(include_str!("../input/test_4.txt")))
);
}
#[test]
fn part_1_complete() {
assert_eq!(
((26, 28), 267),
get_best_location_and_count(&parse_asteroids(include_str!("../input/day_10.txt")))
);
}
#[test]
fn laser_sweep() {
let asteroid_field = parse_asteroids(include_str!("../input/laser_test.txt"));
let laser_location = (8, 3);
let mut hit = sweep_laser_hits(&laser_location, &asteroid_field);
hit.truncate(9);
let expected = vec![
(8, 1),
(9, 0),
(9, 1),
(10, 0),
(9, 2),
(11, 1),
(12, 1),
(11, 2),
(15, 1),
];
assert_eq!(hit, expected);
}
#[test]
fn part_2_laser_sweep() {
let asteroid_field = parse_asteroids(include_str!("../input/test_4.txt"));
let laser_location = get_best_location_and_count(&asteroid_field).0;
assert_eq!(
(11, 12),
find_nth_destroyed_asteroid(&laser_location, &asteroid_field, 1)
);
assert_eq!(
(12, 1),
find_nth_destroyed_asteroid(&laser_location, &asteroid_field, 2)
);
assert_eq!(
(12, 2),
find_nth_destroyed_asteroid(&laser_location, &asteroid_field, 3)
);
assert_eq!(
(12, 8),
find_nth_destroyed_asteroid(&laser_location, &asteroid_field, 10)
);
}
#[test]
fn part_2_complete() {
assert_eq!(
(13, 9),
find_nth_destroyed_asteroid(
&(26, 28),
&parse_asteroids(include_str!("../input/day_10.txt")),
200
)
);
}
|
use super::{FiberId, FiberTracer, TracedFiberEnded, Tracer};
use crate::heap::{Heap, HirId, InlineObject};
use candy_frontend::{hir::Id, module::Module};
use rustc_hash::FxHashMap;
#[derive(Debug)]
pub struct EvaluatedValuesTracer {
module: Module,
evaluated_values: Option<FxHashMap<Id, InlineObject>>,
}
impl EvaluatedValuesTracer {
pub fn new(module: Module) -> Self {
EvaluatedValuesTracer {
module,
evaluated_values: None,
}
}
pub fn values(&self) -> &FxHashMap<Id, InlineObject> {
self.evaluated_values
.as_ref()
.expect("VM didn't finish execution yet.")
}
}
impl Tracer for EvaluatedValuesTracer {
type ForFiber = FiberEvaluatedValuesTracer;
fn root_fiber_created(&mut self) -> Self::ForFiber {
FiberEvaluatedValuesTracer {
module: self.module.clone(),
evaluated_values: FxHashMap::default(),
}
}
fn root_fiber_ended(&mut self, ended: TracedFiberEnded<Self::ForFiber>) {
assert!(self.evaluated_values.is_none());
self.evaluated_values = Some(ended.tracer.evaluated_values);
}
}
#[derive(Debug)]
pub struct FiberEvaluatedValuesTracer {
module: Module,
evaluated_values: FxHashMap<Id, InlineObject>,
}
impl FiberTracer for FiberEvaluatedValuesTracer {
fn child_fiber_created(&mut self, _child: FiberId) -> Self {
FiberEvaluatedValuesTracer {
module: self.module.clone(),
evaluated_values: FxHashMap::default(),
}
}
fn child_fiber_ended(&mut self, mut ended: TracedFiberEnded<Self>) {
self.evaluated_values
.extend(ended.tracer.evaluated_values.drain());
}
fn value_evaluated(&mut self, heap: &mut Heap, expression: HirId, value: InlineObject) {
let id = expression.get();
if id.module != self.module {
return;
}
value.dup(heap);
self.evaluated_values.insert(id.to_owned(), value);
}
fn dup_all_stored_objects(&self, heap: &mut Heap) {
for value in self.evaluated_values.values() {
value.dup(heap);
}
}
}
|
use serde::Serialize;
use std::time::SystemTime;
use std::collections::HashMap;
use sqlx::*;
pub struct DomainEventPublisher {
}
impl DomainEventPublisher {
pub async fn publish_event<T : Serialize<>, I : ToString>(&self, txn : &mut Transaction<'_, MySql>, aggregate_type : String, aggregate_id : I, event : &T) -> Result<()> {
let now = SystemTime::now();
// Find better way
let t = now.duration_since(SystemTime::UNIX_EPOCH).unwrap().as_millis();
let id = t.to_string();
let creation_time = t.to_string();
let payload = serde_json::to_string(event).unwrap();
let mut header_values : HashMap<&str, String> = HashMap::new();
/*
header_values.insert("ID", String::from(id));
header_values.insert(String::from("PARTITION_ID"), String::from("Y"));
header_values.insert(String::from("DESTINATION"), String::from("Y"));
header_values.insert(String::from("DATE"), String::from("Y"));
header_values.insert(String::from("event-type"), String::from("Y"));
header_values.insert(String::from("event-aggregate-type"), String::from("Y"));
*/
header_values.insert("event-aggregate-id", aggregate_id.to_string());
let headers = serde_json::to_string(&header_values).unwrap();
sqlx::query("insert into eventuate.message(id, destination, headers, payload, creation_time) values(?,?,?,?,?)")
.bind(&id)
.bind(aggregate_type)
.bind(headers)
.bind(payload)
.bind(creation_time)
.execute(txn)
.await?;
Ok(())
}
}
|
extern crate cortex_m;
use super::PERIPH;
use boards::nrf51dk::LEDS;
pub struct Led {
pub i: usize,
}
impl Led {
pub fn init() {
cortex_m::interrupt::free(|cs| {
if let Some(p) = PERIPH.borrow(cs).borrow().as_ref() {
// the leds are stored in the static LEDS
// initialize the leds pins
for led in &LEDS {
p.GPIO.pin_cnf[led.i].write(|w| w.dir().output());
}
}
// turn off all the leds on init
for led in &LEDS {
led.off();
}
});
}
pub fn on(&self) {
cortex_m::interrupt::free(|cs| {
if let Some(p) = PERIPH.borrow(cs).borrow().as_ref() {
p.GPIO.outclr.write(|w| unsafe { w.bits(1 << self.i) });
}
});
}
pub fn off(&self) {
cortex_m::interrupt::free(|cs| {
if let Some(p) = PERIPH.borrow(cs).borrow().as_ref() {
p.GPIO.outset.write(|w| unsafe { w.bits(1 << self.i) });
}
});
}
pub fn toggle(&self) {
cortex_m::interrupt::free(|cs| {
if let Some(p) = PERIPH.borrow(cs).borrow().as_ref() {
let state: bool = p.GPIO.in_.read().bits() & (1 << self.i) == 0;
if state {
self.off();
} else {
self.on();
}
}
});
}
} |
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate lazy_static;
mod android;
mod challenge;
mod config;
mod daily;
mod db;
mod local;
mod reader;
mod ui;
mod viewer;
use android::Xpath;
use std::collections::HashMap;
use std::env;
fn main() {
ui::run_ui();
}
fn xuexi(args: ui::ArgsState) {
#[cfg(feature = "release")]
{
let mut current = env::current_exe().unwrap();
current.pop();
env::set_current_dir(current).unwrap();
}
let mut args = args;
println!("当前工作目录{:?}", env::current_dir());
println!("设备名称: {}", android::DEVICE.as_str());
if args.auto {
println!("获取学习积分情况");
args.rules.rule_bottom_mine.click();
args.rules.rule_bonus_entry.click();
let mut bonus = HashMap::new();
while bonus.len() == 0 {
let titles = args.rules.rule_bonus_title.texts();
let scores = args.rules.rule_bonus_score.texts();
bonus = titles.into_iter().zip(scores).collect();
}
dbg!(&bonus);
let completed = "已完成";
args.local = completed != bonus["本地频道"];
args.video = completed != bonus["视听学习"] || completed != bonus["视听学习时长"];
args.article = completed != bonus["我要选读文章"];
args.challenge = completed != bonus["挑战答题"];
args.daily = completed != bonus["每日答题"];
}
println!(
"本地视频:{},视听学习:{},阅读文章:{},挑战答题:{},每日答题:{}.",
args.local, args.video, args.article, args.challenge, args.daily
);
if args.local {
local::Local::new(
args.config.local_column_name.to_string(),
args.rules.clone(),
)
.run();
}
if args.video {
viewer::Viewer::new(
args.config.video_count.unwrap(),
args.config.video_delay.unwrap(),
args.rules.clone(),
)
.run();
}
if args.article {
reader::Reader::new(
args.config.article_column_name.clone(),
args.config.article_count.unwrap(),
args.config.article_delay.unwrap(),
args.config.star_share_comment.unwrap(),
args.config.keep_star_comment,
args.rules.clone(),
)
.run();
}
if args.challenge {
challenge::Challenge::new(
args.config.challenge_count.unwrap(),
args.config.challenge_json.to_string(),
args.config.database_uri.to_string(),
args.rules.clone(),
)
.run();
}
if args.daily {
daily::Daily::new(
args.config.database_uri.to_string(),
args.config.daily_delay.unwrap(),
args.config.daily_forever,
args.rules.clone(),
)
.run();
}
}
|
pub mod force;
pub mod grouping;
|
use scanner_proc_macro::insert_scanner;
#[insert_scanner]
fn main() {
let (mut x1, mut y1) = scan!((i32, i32));
let (mut x2, mut y2) = scan!((i32, i32));
let (mut x3, mut y3) = scan!((i32, i32));
if x1 != x2 {
if x2 == x3 {
std::mem::swap(&mut x1, &mut x3);
std::mem::swap(&mut y1, &mut y3);
} else {
std::mem::swap(&mut x2, &mut x3);
std::mem::swap(&mut y2, &mut y3);
}
}
assert_eq!(x1, x2);
assert_ne!(y1, y2);
let y = if y1 == y3 { y2 } else { y1 };
println!("{} {}", x3, y);
}
|
use amethyst::ecs::*;
pub enum TimeEvent {
Resume,
Stop,
SetSpeed(f32),
}
#[derive(new)]
pub struct TimeDriverRes {
reader: ReaderId<TimeEvent>,
#[new(value = "1.0")]
pub last_speed: f32,
}
system!(TimeDriver, |time: WriteExpect<'a, Time>,
events: Read<'a, EventChannel<TimeEvent>>,
reader: WriteExpect<'a, TimeDriverRes>| {
for ev in events.read(&mut reader.reader) {
match *ev {
TimeEvent::Resume => if time.time_scale() != 0.0 {
time.set_time_scale(reader.last_speed);
},
TimeEvent::Stop => {
reader.last_speed = time.time_scale();
time.set_time_scale(0);
}
TimeEvent::SetSpeed(s) => time.set_time_scale(s),
}
}
});
|
use proconio::input;
fn main() {
input! {
n: usize,
l: i64,
r: i64,
a: [i64; n],
};
let mut dp = vec![vec![0; 2]; n];
dp[0][0] = a[0];
dp[0][1] = l;
for i in 1..n {
dp[i][0] = dp[i - 1][0].min(dp[i - 1][1]) + a[i];
dp[i][1] = dp[i - 1][1] + l;
}
let mut ans = dp[n - 1][0].min(dp[n - 1][1]);
let mut pd = vec![0; 2];
for i in (0..n).rev() {
pd = vec![pd[0].min(pd[1]) + a[i], pd[1] + r];
let back = pd[0].min(pd[1]);
if i == 0 {
ans = ans.min(back);
} else {
let front = dp[i - 1][0].min(dp[i - 1][1]);
ans = ans.min(front + back);
}
}
println!("{}", ans);
}
|
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn ClearPropVariantArray(rgpropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT, cvars: u32) {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn ClearPropVariantArray(rgpropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, cvars: u32);
}
::core::mem::transmute(ClearPropVariantArray(::core::mem::transmute(rgpropvar), ::core::mem::transmute(cvars)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn ClearVariantArray(pvars: *mut super::super::super::System::Com::VARIANT, cvars: u32) {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn ClearVariantArray(pvars: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, cvars: u32);
}
::core::mem::transmute(ClearVariantArray(::core::mem::transmute(pvars), ::core::mem::transmute(cvars)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DRAWPROGRESSFLAGS(pub i32);
pub const DPF_NONE: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(0i32);
pub const DPF_MARQUEE: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(1i32);
pub const DPF_MARQUEE_COMPLETE: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(2i32);
pub const DPF_ERROR: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(4i32);
pub const DPF_WARNING: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(8i32);
pub const DPF_STOPPED: DRAWPROGRESSFLAGS = DRAWPROGRESSFLAGS(16i32);
impl ::core::convert::From<i32> for DRAWPROGRESSFLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DRAWPROGRESSFLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct GETPROPERTYSTOREFLAGS(pub i32);
pub const GPS_DEFAULT: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(0i32);
pub const GPS_HANDLERPROPERTIESONLY: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(1i32);
pub const GPS_READWRITE: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(2i32);
pub const GPS_TEMPORARY: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(4i32);
pub const GPS_FASTPROPERTIESONLY: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(8i32);
pub const GPS_OPENSLOWITEM: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(16i32);
pub const GPS_DELAYCREATION: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(32i32);
pub const GPS_BESTEFFORT: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(64i32);
pub const GPS_NO_OPLOCK: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(128i32);
pub const GPS_PREFERQUERYPROPERTIES: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(256i32);
pub const GPS_EXTRINSICPROPERTIES: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(512i32);
pub const GPS_EXTRINSICPROPERTIESONLY: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(1024i32);
pub const GPS_VOLATILEPROPERTIES: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(2048i32);
pub const GPS_VOLATILEPROPERTIESONLY: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(4096i32);
pub const GPS_MASK_VALID: GETPROPERTYSTOREFLAGS = GETPROPERTYSTOREFLAGS(8191i32);
impl ::core::convert::From<i32> for GETPROPERTYSTOREFLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for GETPROPERTYSTOREFLAGS {
type Abi = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct ICreateObject(pub ::windows::core::IUnknown);
impl ICreateObject {
pub unsafe fn CreateObject<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, T: ::windows::core::Interface>(&self, clsid: *const ::windows::core::GUID, punkouter: Param1) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(clsid), punkouter.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for ICreateObject {
type Vtable = ICreateObject_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75121952_e0d0_43e5_9380_1d80483acf72);
}
impl ::core::convert::From<ICreateObject> for ::windows::core::IUnknown {
fn from(value: ICreateObject) -> Self {
value.0
}
}
impl ::core::convert::From<&ICreateObject> for ::windows::core::IUnknown {
fn from(value: &ICreateObject) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICreateObject {
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 ICreateObject {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ICreateObject_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, clsid: *const ::windows::core::GUID, punkouter: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IDelayedPropertyStoreFactory(pub ::windows::core::IUnknown);
impl IDelayedPropertyStoreFactory {
pub unsafe fn GetPropertyStore<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, T: ::windows::core::Interface>(&self, flags: GETPROPERTYSTOREFLAGS, punkfactory: Param1) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags), punkfactory.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn GetPropertyStoreForKeys<T: ::windows::core::Interface>(&self, rgkeys: *const PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(rgkeys), ::core::mem::transmute(ckeys), ::core::mem::transmute(flags), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn GetDelayedPropertyStore<T: ::windows::core::Interface>(&self, flags: GETPROPERTYSTOREFLAGS, dwstoreid: u32) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags), ::core::mem::transmute(dwstoreid), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for IDelayedPropertyStoreFactory {
type Vtable = IDelayedPropertyStoreFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40d4577f_e237_4bdb_bd69_58f089431b6a);
}
impl ::core::convert::From<IDelayedPropertyStoreFactory> for ::windows::core::IUnknown {
fn from(value: IDelayedPropertyStoreFactory) -> Self {
value.0
}
}
impl ::core::convert::From<&IDelayedPropertyStoreFactory> for ::windows::core::IUnknown {
fn from(value: &IDelayedPropertyStoreFactory) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDelayedPropertyStoreFactory {
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 IDelayedPropertyStoreFactory {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IDelayedPropertyStoreFactory> for IPropertyStoreFactory {
fn from(value: IDelayedPropertyStoreFactory) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IDelayedPropertyStoreFactory> for IPropertyStoreFactory {
fn from(value: &IDelayedPropertyStoreFactory) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyStoreFactory> for IDelayedPropertyStoreFactory {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyStoreFactory> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyStoreFactory> for &IDelayedPropertyStoreFactory {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyStoreFactory> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDelayedPropertyStoreFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: GETPROPERTYSTOREFLAGS, punkfactory: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rgkeys: *const PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: GETPROPERTYSTOREFLAGS, dwstoreid: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IInitializeWithFile(pub ::windows::core::IUnknown);
impl IInitializeWithFile {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszfilepath: Param0, grfmode: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszfilepath.into_param().abi(), ::core::mem::transmute(grfmode)).ok()
}
}
unsafe impl ::windows::core::Interface for IInitializeWithFile {
type Vtable = IInitializeWithFile_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7d14566_0509_4cce_a71f_0a554233bd9b);
}
impl ::core::convert::From<IInitializeWithFile> for ::windows::core::IUnknown {
fn from(value: IInitializeWithFile) -> Self {
value.0
}
}
impl ::core::convert::From<&IInitializeWithFile> for ::windows::core::IUnknown {
fn from(value: &IInitializeWithFile) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IInitializeWithFile {
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 IInitializeWithFile {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IInitializeWithFile_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::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, pszfilepath: super::super::super::Foundation::PWSTR, grfmode: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IInitializeWithStream(pub ::windows::core::IUnknown);
impl IInitializeWithStream {
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IStream>>(&self, pstream: Param0, grfmode: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pstream.into_param().abi(), ::core::mem::transmute(grfmode)).ok()
}
}
unsafe impl ::windows::core::Interface for IInitializeWithStream {
type Vtable = IInitializeWithStream_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb824b49d_22ac_4161_ac8a_9916e8fa3f7f);
}
impl ::core::convert::From<IInitializeWithStream> for ::windows::core::IUnknown {
fn from(value: IInitializeWithStream) -> Self {
value.0
}
}
impl ::core::convert::From<&IInitializeWithStream> for ::windows::core::IUnknown {
fn from(value: &IInitializeWithStream) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IInitializeWithStream {
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 IInitializeWithStream {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IInitializeWithStream_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstream: ::windows::core::RawPtr, grfmode: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct INamedPropertyStore(pub ::windows::core::IUnknown);
impl INamedPropertyStore {
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetNamedValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszname: Param0) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszname.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn SetNamedValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszname: Param0, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszname.into_param().abi(), ::core::mem::transmute(propvar)).ok()
}
pub unsafe fn GetNameCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetNameAt(&self, iprop: u32) -> ::windows::core::Result<super::super::super::Foundation::BSTR> {
let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprop), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for INamedPropertyStore {
type Vtable = INamedPropertyStore_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x71604b0f_97b0_4764_8577_2f13e98a1422);
}
impl ::core::convert::From<INamedPropertyStore> for ::windows::core::IUnknown {
fn from(value: INamedPropertyStore) -> Self {
value.0
}
}
impl ::core::convert::From<&INamedPropertyStore> for ::windows::core::IUnknown {
fn from(value: &INamedPropertyStore) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for INamedPropertyStore {
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 INamedPropertyStore {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct INamedPropertyStore_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::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(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszname: super::super::super::Foundation::PWSTR, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszname: super::super::super::Foundation::PWSTR, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwcount: *mut u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprop: u32, pbstrname: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IObjectWithPropertyKey(pub ::windows::core::IUnknown);
impl IObjectWithPropertyKey {
pub unsafe fn SetPropertyKey(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
}
unsafe impl ::windows::core::Interface for IObjectWithPropertyKey {
type Vtable = IObjectWithPropertyKey_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfc0ca0a7_c316_4fd2_9031_3e628e6d4f23);
}
impl ::core::convert::From<IObjectWithPropertyKey> for ::windows::core::IUnknown {
fn from(value: IObjectWithPropertyKey) -> Self {
value.0
}
}
impl ::core::convert::From<&IObjectWithPropertyKey> for ::windows::core::IUnknown {
fn from(value: &IObjectWithPropertyKey) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IObjectWithPropertyKey {
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 IObjectWithPropertyKey {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IObjectWithPropertyKey_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPersistSerializedPropStorage(pub ::windows::core::IUnknown);
impl IPersistSerializedPropStorage {
pub unsafe fn SetFlags(&self, flags: i32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags)).ok()
}
pub unsafe fn SetPropertyStorage(&self, psps: *const SERIALIZEDPROPSTORAGE, cb: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(psps), ::core::mem::transmute(cb)).ok()
}
pub unsafe fn GetPropertyStorage(&self, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppsps), ::core::mem::transmute(pcb)).ok()
}
}
unsafe impl ::windows::core::Interface for IPersistSerializedPropStorage {
type Vtable = IPersistSerializedPropStorage_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe318ad57_0aa0_450f_aca5_6fab7103d917);
}
impl ::core::convert::From<IPersistSerializedPropStorage> for ::windows::core::IUnknown {
fn from(value: IPersistSerializedPropStorage) -> Self {
value.0
}
}
impl ::core::convert::From<&IPersistSerializedPropStorage> for ::windows::core::IUnknown {
fn from(value: &IPersistSerializedPropStorage) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPersistSerializedPropStorage {
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 IPersistSerializedPropStorage {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPersistSerializedPropStorage_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psps: *const SERIALIZEDPROPSTORAGE, cb: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPersistSerializedPropStorage2(pub ::windows::core::IUnknown);
impl IPersistSerializedPropStorage2 {
pub unsafe fn SetFlags(&self, flags: i32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags)).ok()
}
pub unsafe fn SetPropertyStorage(&self, psps: *const SERIALIZEDPROPSTORAGE, cb: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(psps), ::core::mem::transmute(cb)).ok()
}
pub unsafe fn GetPropertyStorage(&self, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppsps), ::core::mem::transmute(pcb)).ok()
}
pub unsafe fn GetPropertyStorageSize(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetPropertyStorageBuffer(&self, psps: *mut SERIALIZEDPROPSTORAGE, cb: u32, pcbwritten: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(psps), ::core::mem::transmute(cb), ::core::mem::transmute(pcbwritten)).ok()
}
}
unsafe impl ::windows::core::Interface for IPersistSerializedPropStorage2 {
type Vtable = IPersistSerializedPropStorage2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x77effa68_4f98_4366_ba72_573b3d880571);
}
impl ::core::convert::From<IPersistSerializedPropStorage2> for ::windows::core::IUnknown {
fn from(value: IPersistSerializedPropStorage2) -> Self {
value.0
}
}
impl ::core::convert::From<&IPersistSerializedPropStorage2> for ::windows::core::IUnknown {
fn from(value: &IPersistSerializedPropStorage2) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPersistSerializedPropStorage2 {
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 IPersistSerializedPropStorage2 {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPersistSerializedPropStorage2> for IPersistSerializedPropStorage {
fn from(value: IPersistSerializedPropStorage2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPersistSerializedPropStorage2> for IPersistSerializedPropStorage {
fn from(value: &IPersistSerializedPropStorage2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPersistSerializedPropStorage> for IPersistSerializedPropStorage2 {
fn into_param(self) -> ::windows::core::Param<'a, IPersistSerializedPropStorage> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPersistSerializedPropStorage> for &IPersistSerializedPropStorage2 {
fn into_param(self) -> ::windows::core::Param<'a, IPersistSerializedPropStorage> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPersistSerializedPropStorage2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psps: *const SERIALIZEDPROPSTORAGE, cb: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcb: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psps: *mut SERIALIZEDPROPSTORAGE, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyChange(pub ::windows::core::IUnknown);
impl IPropertyChange {
pub unsafe fn SetPropertyKey(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn ApplyToPropVariant(&self, propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvarin), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyChange {
type Vtable = IPropertyChange_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf917bc8a_1bba_4478_a245_1bde03eb9431);
}
impl ::core::convert::From<IPropertyChange> for ::windows::core::IUnknown {
fn from(value: IPropertyChange) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyChange> for ::windows::core::IUnknown {
fn from(value: &IPropertyChange) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyChange {
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 IPropertyChange {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyChange> for IObjectWithPropertyKey {
fn from(value: IPropertyChange) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyChange> for IObjectWithPropertyKey {
fn from(value: &IPropertyChange) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IObjectWithPropertyKey> for IPropertyChange {
fn into_param(self) -> ::windows::core::Param<'a, IObjectWithPropertyKey> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IObjectWithPropertyKey> for &IPropertyChange {
fn into_param(self) -> ::windows::core::Param<'a, IObjectWithPropertyKey> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyChange_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppropvarout: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyChangeArray(pub ::windows::core::IUnknown);
impl IPropertyChangeArray {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt<T: ::windows::core::Interface>(&self, iindex: u32) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(iindex), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn InsertAt<'a, Param1: ::windows::core::IntoParam<'a, IPropertyChange>>(&self, iindex: u32, ppropchange: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(iindex), ppropchange.into_param().abi()).ok()
}
pub unsafe fn Append<'a, Param0: ::windows::core::IntoParam<'a, IPropertyChange>>(&self, ppropchange: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ppropchange.into_param().abi()).ok()
}
pub unsafe fn AppendOrReplace<'a, Param0: ::windows::core::IntoParam<'a, IPropertyChange>>(&self, ppropchange: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ppropchange.into_param().abi()).ok()
}
pub unsafe fn RemoveAt(&self, iindex: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(iindex)).ok()
}
pub unsafe fn IsKeyInArray(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyChangeArray {
type Vtable = IPropertyChangeArray_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380f5cad_1b5e_42f2_805d_637fd392d31e);
}
impl ::core::convert::From<IPropertyChangeArray> for ::windows::core::IUnknown {
fn from(value: IPropertyChangeArray) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyChangeArray> for ::windows::core::IUnknown {
fn from(value: &IPropertyChangeArray) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyChangeArray {
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 IPropertyChangeArray {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyChangeArray_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcoperations: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iindex: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iindex: u32, ppropchange: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropchange: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropchange: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iindex: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescription(pub ::windows::core::IUnknown);
impl IPropertyDescription {
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCanonicalName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetPropertyType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetEditInvitation(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetTypeFlags(&self, mask: PROPDESC_TYPE_FLAGS) -> ::windows::core::Result<PROPDESC_TYPE_FLAGS> {
let mut result__: <PROPDESC_TYPE_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(mask), &mut result__).from_abi::<PROPDESC_TYPE_FLAGS>(result__)
}
pub unsafe fn GetViewFlags(&self) -> ::windows::core::Result<PROPDESC_VIEW_FLAGS> {
let mut result__: <PROPDESC_VIEW_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_VIEW_FLAGS>(result__)
}
pub unsafe fn GetDefaultColumnWidth(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetDisplayType(&self) -> ::windows::core::Result<PROPDESC_DISPLAYTYPE> {
let mut result__: <PROPDESC_DISPLAYTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_DISPLAYTYPE>(result__)
}
pub unsafe fn GetColumnState(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetGroupingRange(&self) -> ::windows::core::Result<PROPDESC_GROUPING_RANGE> {
let mut result__: <PROPDESC_GROUPING_RANGE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_GROUPING_RANGE>(result__)
}
pub unsafe fn GetRelativeDescriptionType(&self) -> ::windows::core::Result<PROPDESC_RELATIVEDESCRIPTION_TYPE> {
let mut result__: <PROPDESC_RELATIVEDESCRIPTION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_RELATIVEDESCRIPTION_TYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(ppszdesc1), ::core::mem::transmute(ppszdesc2)).ok()
}
pub unsafe fn GetSortDescription(&self) -> ::windows::core::Result<PROPDESC_SORTDESCRIPTION> {
let mut result__: <PROPDESC_SORTDESCRIPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SORTDESCRIPTION>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSortDescriptionLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, fdescending: Param0) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), fdescending.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetAggregationType(&self) -> ::windows::core::Result<PROPDESC_AGGREGATION_TYPE> {
let mut result__: <PROPDESC_AGGREGATION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_AGGREGATION_TYPE>(result__)
}
#[cfg(feature = "Win32_System_Search_Common")]
pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontype), ::core::mem::transmute(popdefault)).ok()
}
pub unsafe fn GetEnumTypeList<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn CoerceToCanonicalValue(&self, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn IsValueCanonical(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyDescription {
type Vtable = IPropertyDescription_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6f79d558_3e96_4549_a1d1_7d75d2288814);
}
impl ::core::convert::From<IPropertyDescription> for ::windows::core::IUnknown {
fn from(value: IPropertyDescription) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescription> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescription) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescription {
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 IPropertyDescription {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescription_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvartype: *mut u16) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszinvite: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mask: PROPDESC_TYPE_FLAGS, ppdtflags: *mut PROPDESC_TYPE_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdvflags: *mut PROPDESC_VIEW_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdisplaytype: *mut PROPDESC_DISPLAYTYPE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcsflags: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pgr: *mut PROPDESC_GROUPING_RANGE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prdt: *mut PROPDESC_RELATIVEDESCRIPTION_TYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psd: *mut PROPDESC_SORTDESCRIPTION) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdescending: super::super::super::Foundation::BOOL, ppszdescription: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggtype: *mut PROPDESC_AGGREGATION_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Search_Common")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Search_Common"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescription2(pub ::windows::core::IUnknown);
impl IPropertyDescription2 {
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCanonicalName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetPropertyType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetEditInvitation(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetTypeFlags(&self, mask: PROPDESC_TYPE_FLAGS) -> ::windows::core::Result<PROPDESC_TYPE_FLAGS> {
let mut result__: <PROPDESC_TYPE_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(mask), &mut result__).from_abi::<PROPDESC_TYPE_FLAGS>(result__)
}
pub unsafe fn GetViewFlags(&self) -> ::windows::core::Result<PROPDESC_VIEW_FLAGS> {
let mut result__: <PROPDESC_VIEW_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_VIEW_FLAGS>(result__)
}
pub unsafe fn GetDefaultColumnWidth(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetDisplayType(&self) -> ::windows::core::Result<PROPDESC_DISPLAYTYPE> {
let mut result__: <PROPDESC_DISPLAYTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_DISPLAYTYPE>(result__)
}
pub unsafe fn GetColumnState(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetGroupingRange(&self) -> ::windows::core::Result<PROPDESC_GROUPING_RANGE> {
let mut result__: <PROPDESC_GROUPING_RANGE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_GROUPING_RANGE>(result__)
}
pub unsafe fn GetRelativeDescriptionType(&self) -> ::windows::core::Result<PROPDESC_RELATIVEDESCRIPTION_TYPE> {
let mut result__: <PROPDESC_RELATIVEDESCRIPTION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_RELATIVEDESCRIPTION_TYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(ppszdesc1), ::core::mem::transmute(ppszdesc2)).ok()
}
pub unsafe fn GetSortDescription(&self) -> ::windows::core::Result<PROPDESC_SORTDESCRIPTION> {
let mut result__: <PROPDESC_SORTDESCRIPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SORTDESCRIPTION>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSortDescriptionLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, fdescending: Param0) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), fdescending.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetAggregationType(&self) -> ::windows::core::Result<PROPDESC_AGGREGATION_TYPE> {
let mut result__: <PROPDESC_AGGREGATION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_AGGREGATION_TYPE>(result__)
}
#[cfg(feature = "Win32_System_Search_Common")]
pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontype), ::core::mem::transmute(popdefault)).ok()
}
pub unsafe fn GetEnumTypeList<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn CoerceToCanonicalValue(&self, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn IsValueCanonical(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetImageReferenceForValue(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyDescription2 {
type Vtable = IPropertyDescription2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x57d2eded_5062_400e_b107_5dae79fe57a6);
}
impl ::core::convert::From<IPropertyDescription2> for ::windows::core::IUnknown {
fn from(value: IPropertyDescription2) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescription2> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescription2) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescription2 {
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 IPropertyDescription2 {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyDescription2> for IPropertyDescription {
fn from(value: IPropertyDescription2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyDescription2> for IPropertyDescription {
fn from(value: &IPropertyDescription2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for IPropertyDescription2 {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for &IPropertyDescription2 {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescription2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvartype: *mut u16) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszinvite: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mask: PROPDESC_TYPE_FLAGS, ppdtflags: *mut PROPDESC_TYPE_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdvflags: *mut PROPDESC_VIEW_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdisplaytype: *mut PROPDESC_DISPLAYTYPE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcsflags: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pgr: *mut PROPDESC_GROUPING_RANGE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prdt: *mut PROPDESC_RELATIVEDESCRIPTION_TYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psd: *mut PROPDESC_SORTDESCRIPTION) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdescending: super::super::super::Foundation::BOOL, ppszdescription: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggtype: *mut PROPDESC_AGGREGATION_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Search_Common")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Search_Common"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszimageres: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescriptionAliasInfo(pub ::windows::core::IUnknown);
impl IPropertyDescriptionAliasInfo {
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCanonicalName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetPropertyType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetEditInvitation(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetTypeFlags(&self, mask: PROPDESC_TYPE_FLAGS) -> ::windows::core::Result<PROPDESC_TYPE_FLAGS> {
let mut result__: <PROPDESC_TYPE_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(mask), &mut result__).from_abi::<PROPDESC_TYPE_FLAGS>(result__)
}
pub unsafe fn GetViewFlags(&self) -> ::windows::core::Result<PROPDESC_VIEW_FLAGS> {
let mut result__: <PROPDESC_VIEW_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_VIEW_FLAGS>(result__)
}
pub unsafe fn GetDefaultColumnWidth(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetDisplayType(&self) -> ::windows::core::Result<PROPDESC_DISPLAYTYPE> {
let mut result__: <PROPDESC_DISPLAYTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_DISPLAYTYPE>(result__)
}
pub unsafe fn GetColumnState(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetGroupingRange(&self) -> ::windows::core::Result<PROPDESC_GROUPING_RANGE> {
let mut result__: <PROPDESC_GROUPING_RANGE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_GROUPING_RANGE>(result__)
}
pub unsafe fn GetRelativeDescriptionType(&self) -> ::windows::core::Result<PROPDESC_RELATIVEDESCRIPTION_TYPE> {
let mut result__: <PROPDESC_RELATIVEDESCRIPTION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_RELATIVEDESCRIPTION_TYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(ppszdesc1), ::core::mem::transmute(ppszdesc2)).ok()
}
pub unsafe fn GetSortDescription(&self) -> ::windows::core::Result<PROPDESC_SORTDESCRIPTION> {
let mut result__: <PROPDESC_SORTDESCRIPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SORTDESCRIPTION>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSortDescriptionLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, fdescending: Param0) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), fdescending.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetAggregationType(&self) -> ::windows::core::Result<PROPDESC_AGGREGATION_TYPE> {
let mut result__: <PROPDESC_AGGREGATION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_AGGREGATION_TYPE>(result__)
}
#[cfg(feature = "Win32_System_Search_Common")]
pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontype), ::core::mem::transmute(popdefault)).ok()
}
pub unsafe fn GetEnumTypeList<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn CoerceToCanonicalValue(&self, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn IsValueCanonical(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar)).ok()
}
pub unsafe fn GetSortByAlias<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn GetAdditionalSortByAliases<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyDescriptionAliasInfo {
type Vtable = IPropertyDescriptionAliasInfo_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf67104fc_2af9_46fd_b32d_243c1404f3d1);
}
impl ::core::convert::From<IPropertyDescriptionAliasInfo> for ::windows::core::IUnknown {
fn from(value: IPropertyDescriptionAliasInfo) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescriptionAliasInfo> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescriptionAliasInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescriptionAliasInfo {
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 IPropertyDescriptionAliasInfo {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyDescriptionAliasInfo> for IPropertyDescription {
fn from(value: IPropertyDescriptionAliasInfo) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyDescriptionAliasInfo> for IPropertyDescription {
fn from(value: &IPropertyDescriptionAliasInfo) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for IPropertyDescriptionAliasInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for &IPropertyDescriptionAliasInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescriptionAliasInfo_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvartype: *mut u16) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszinvite: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mask: PROPDESC_TYPE_FLAGS, ppdtflags: *mut PROPDESC_TYPE_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdvflags: *mut PROPDESC_VIEW_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdisplaytype: *mut PROPDESC_DISPLAYTYPE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcsflags: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pgr: *mut PROPDESC_GROUPING_RANGE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prdt: *mut PROPDESC_RELATIVEDESCRIPTION_TYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psd: *mut PROPDESC_SORTDESCRIPTION) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdescending: super::super::super::Foundation::BOOL, ppszdescription: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggtype: *mut PROPDESC_AGGREGATION_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Search_Common")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Search_Common"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescriptionList(pub ::windows::core::IUnknown);
impl IPropertyDescriptionList {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt<T: ::windows::core::Interface>(&self, ielem: u32) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(ielem), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyDescriptionList {
type Vtable = IPropertyDescriptionList_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1f9fc1d0_c39b_4b26_817f_011967d3440e);
}
impl ::core::convert::From<IPropertyDescriptionList> for ::windows::core::IUnknown {
fn from(value: IPropertyDescriptionList) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescriptionList> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescriptionList) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescriptionList {
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 IPropertyDescriptionList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescriptionList_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcelem: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ielem: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescriptionRelatedPropertyInfo(pub ::windows::core::IUnknown);
impl IPropertyDescriptionRelatedPropertyInfo {
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCanonicalName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetPropertyType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetEditInvitation(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetTypeFlags(&self, mask: PROPDESC_TYPE_FLAGS) -> ::windows::core::Result<PROPDESC_TYPE_FLAGS> {
let mut result__: <PROPDESC_TYPE_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(mask), &mut result__).from_abi::<PROPDESC_TYPE_FLAGS>(result__)
}
pub unsafe fn GetViewFlags(&self) -> ::windows::core::Result<PROPDESC_VIEW_FLAGS> {
let mut result__: <PROPDESC_VIEW_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_VIEW_FLAGS>(result__)
}
pub unsafe fn GetDefaultColumnWidth(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetDisplayType(&self) -> ::windows::core::Result<PROPDESC_DISPLAYTYPE> {
let mut result__: <PROPDESC_DISPLAYTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_DISPLAYTYPE>(result__)
}
pub unsafe fn GetColumnState(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetGroupingRange(&self) -> ::windows::core::Result<PROPDESC_GROUPING_RANGE> {
let mut result__: <PROPDESC_GROUPING_RANGE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_GROUPING_RANGE>(result__)
}
pub unsafe fn GetRelativeDescriptionType(&self) -> ::windows::core::Result<PROPDESC_RELATIVEDESCRIPTION_TYPE> {
let mut result__: <PROPDESC_RELATIVEDESCRIPTION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_RELATIVEDESCRIPTION_TYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(ppszdesc1), ::core::mem::transmute(ppszdesc2)).ok()
}
pub unsafe fn GetSortDescription(&self) -> ::windows::core::Result<PROPDESC_SORTDESCRIPTION> {
let mut result__: <PROPDESC_SORTDESCRIPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SORTDESCRIPTION>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSortDescriptionLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, fdescending: Param0) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), fdescending.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetAggregationType(&self) -> ::windows::core::Result<PROPDESC_AGGREGATION_TYPE> {
let mut result__: <PROPDESC_AGGREGATION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_AGGREGATION_TYPE>(result__)
}
#[cfg(feature = "Win32_System_Search_Common")]
pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontype), ::core::mem::transmute(popdefault)).ok()
}
pub unsafe fn GetEnumTypeList<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn CoerceToCanonicalValue(&self, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn IsValueCanonical(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetRelatedProperty<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, T: ::windows::core::Interface>(&self, pszrelationshipname: Param0) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), pszrelationshipname.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyDescriptionRelatedPropertyInfo {
type Vtable = IPropertyDescriptionRelatedPropertyInfo_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x507393f4_2a3d_4a60_b59e_d9c75716c2dd);
}
impl ::core::convert::From<IPropertyDescriptionRelatedPropertyInfo> for ::windows::core::IUnknown {
fn from(value: IPropertyDescriptionRelatedPropertyInfo) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescriptionRelatedPropertyInfo> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescriptionRelatedPropertyInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescriptionRelatedPropertyInfo {
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 IPropertyDescriptionRelatedPropertyInfo {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyDescriptionRelatedPropertyInfo> for IPropertyDescription {
fn from(value: IPropertyDescriptionRelatedPropertyInfo) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyDescriptionRelatedPropertyInfo> for IPropertyDescription {
fn from(value: &IPropertyDescriptionRelatedPropertyInfo) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for IPropertyDescriptionRelatedPropertyInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for &IPropertyDescriptionRelatedPropertyInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescriptionRelatedPropertyInfo_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvartype: *mut u16) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszinvite: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mask: PROPDESC_TYPE_FLAGS, ppdtflags: *mut PROPDESC_TYPE_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdvflags: *mut PROPDESC_VIEW_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdisplaytype: *mut PROPDESC_DISPLAYTYPE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcsflags: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pgr: *mut PROPDESC_GROUPING_RANGE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prdt: *mut PROPDESC_RELATIVEDESCRIPTION_TYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psd: *mut PROPDESC_SORTDESCRIPTION) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdescending: super::super::super::Foundation::BOOL, ppszdescription: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggtype: *mut PROPDESC_AGGREGATION_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Search_Common")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Search_Common"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszrelationshipname: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyDescriptionSearchInfo(pub ::windows::core::IUnknown);
impl IPropertyDescriptionSearchInfo {
pub unsafe fn GetPropertyKey(&self) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCanonicalName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetPropertyType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetEditInvitation(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetTypeFlags(&self, mask: PROPDESC_TYPE_FLAGS) -> ::windows::core::Result<PROPDESC_TYPE_FLAGS> {
let mut result__: <PROPDESC_TYPE_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(mask), &mut result__).from_abi::<PROPDESC_TYPE_FLAGS>(result__)
}
pub unsafe fn GetViewFlags(&self) -> ::windows::core::Result<PROPDESC_VIEW_FLAGS> {
let mut result__: <PROPDESC_VIEW_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_VIEW_FLAGS>(result__)
}
pub unsafe fn GetDefaultColumnWidth(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetDisplayType(&self) -> ::windows::core::Result<PROPDESC_DISPLAYTYPE> {
let mut result__: <PROPDESC_DISPLAYTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_DISPLAYTYPE>(result__)
}
pub unsafe fn GetColumnState(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetGroupingRange(&self) -> ::windows::core::Result<PROPDESC_GROUPING_RANGE> {
let mut result__: <PROPDESC_GROUPING_RANGE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_GROUPING_RANGE>(result__)
}
pub unsafe fn GetRelativeDescriptionType(&self) -> ::windows::core::Result<PROPDESC_RELATIVEDESCRIPTION_TYPE> {
let mut result__: <PROPDESC_RELATIVEDESCRIPTION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_RELATIVEDESCRIPTION_TYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(ppszdesc1), ::core::mem::transmute(ppszdesc2)).ok()
}
pub unsafe fn GetSortDescription(&self) -> ::windows::core::Result<PROPDESC_SORTDESCRIPTION> {
let mut result__: <PROPDESC_SORTDESCRIPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SORTDESCRIPTION>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSortDescriptionLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, fdescending: Param0) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), fdescending.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetAggregationType(&self) -> ::windows::core::Result<PROPDESC_AGGREGATION_TYPE> {
let mut result__: <PROPDESC_AGGREGATION_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_AGGREGATION_TYPE>(result__)
}
#[cfg(feature = "Win32_System_Search_Common")]
pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontype), ::core::mem::transmute(popdefault)).ok()
}
pub unsafe fn GetEnumTypeList<T: ::windows::core::Interface>(&self) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn CoerceToCanonicalValue(&self, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn IsValueCanonical(&self, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvar)).ok()
}
pub unsafe fn GetSearchInfoFlags(&self) -> ::windows::core::Result<PROPDESC_SEARCHINFO_FLAGS> {
let mut result__: <PROPDESC_SEARCHINFO_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_SEARCHINFO_FLAGS>(result__)
}
pub unsafe fn GetColumnIndexType(&self) -> ::windows::core::Result<PROPDESC_COLUMNINDEX_TYPE> {
let mut result__: <PROPDESC_COLUMNINDEX_TYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPDESC_COLUMNINDEX_TYPE>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetProjectionString(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn GetMaxSize(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyDescriptionSearchInfo {
type Vtable = IPropertyDescriptionSearchInfo_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x078f91bd_29a2_440f_924e_46a291524520);
}
impl ::core::convert::From<IPropertyDescriptionSearchInfo> for ::windows::core::IUnknown {
fn from(value: IPropertyDescriptionSearchInfo) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyDescriptionSearchInfo> for ::windows::core::IUnknown {
fn from(value: &IPropertyDescriptionSearchInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyDescriptionSearchInfo {
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 IPropertyDescriptionSearchInfo {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyDescriptionSearchInfo> for IPropertyDescription {
fn from(value: IPropertyDescriptionSearchInfo) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyDescriptionSearchInfo> for IPropertyDescription {
fn from(value: &IPropertyDescriptionSearchInfo) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for IPropertyDescriptionSearchInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyDescription> for &IPropertyDescriptionSearchInfo {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyDescription> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyDescriptionSearchInfo_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvartype: *mut u16) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszinvite: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mask: PROPDESC_TYPE_FLAGS, ppdtflags: *mut PROPDESC_TYPE_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdvflags: *mut PROPDESC_VIEW_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdisplaytype: *mut PROPDESC_DISPLAYTYPE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcsflags: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pgr: *mut PROPDESC_GROUPING_RANGE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prdt: *mut PROPDESC_RELATIVEDESCRIPTION_TYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszdesc1: *mut super::super::super::Foundation::PWSTR, ppszdesc2: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psd: *mut PROPDESC_SORTDESCRIPTION) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdescending: super::super::super::Foundation::BOOL, ppszdescription: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggtype: *mut PROPDESC_AGGREGATION_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Search_Common")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Search_Common"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdsiflags: *mut PROPDESC_SEARCHINFO_FLAGS) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdcitype: *mut PROPDESC_COLUMNINDEX_TYPE) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszprojection: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcbmaxsize: *mut u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyEnumType(pub ::windows::core::IUnknown);
impl IPropertyEnumType {
pub unsafe fn GetEnumType(&self) -> ::windows::core::Result<PROPENUMTYPE> {
let mut result__: <PROPENUMTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPENUMTYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRangeMinValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRangeSetValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayText(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyEnumType {
type Vtable = IPropertyEnumType_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x11e1fbf9_2d56_4a6b_8db3_7cd193a471f2);
}
impl ::core::convert::From<IPropertyEnumType> for ::windows::core::IUnknown {
fn from(value: IPropertyEnumType) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyEnumType> for ::windows::core::IUnknown {
fn from(value: &IPropertyEnumType) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyEnumType {
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 IPropertyEnumType {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyEnumType_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, penumtype: *mut PROPENUMTYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvarmin: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvarset: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyEnumType2(pub ::windows::core::IUnknown);
impl IPropertyEnumType2 {
pub unsafe fn GetEnumType(&self) -> ::windows::core::Result<PROPENUMTYPE> {
let mut result__: <PROPENUMTYPE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<PROPENUMTYPE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRangeMinValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetRangeSetValue(&self) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayText(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetImageReference(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyEnumType2 {
type Vtable = IPropertyEnumType2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b6e051c_5ddd_4321_9070_fe2acb55e794);
}
impl ::core::convert::From<IPropertyEnumType2> for ::windows::core::IUnknown {
fn from(value: IPropertyEnumType2) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyEnumType2> for ::windows::core::IUnknown {
fn from(value: &IPropertyEnumType2) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyEnumType2 {
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 IPropertyEnumType2 {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyEnumType2> for IPropertyEnumType {
fn from(value: IPropertyEnumType2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyEnumType2> for IPropertyEnumType {
fn from(value: &IPropertyEnumType2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyEnumType> for IPropertyEnumType2 {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyEnumType> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyEnumType> for &IPropertyEnumType2 {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyEnumType> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyEnumType2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, penumtype: *mut PROPENUMTYPE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvarmin: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropvarset: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszimageres: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyEnumTypeList(pub ::windows::core::IUnknown);
impl IPropertyEnumTypeList {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt<T: ::windows::core::Interface>(&self, itype: u32) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itype), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn GetConditionAt<T: ::windows::core::Interface>(&self, nindex: u32) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(nindex), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FindMatchingIndex(&self, propvarcmp: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(propvarcmp), &mut result__).from_abi::<u32>(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyEnumTypeList {
type Vtable = IPropertyEnumTypeList_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa99400f4_3d84_4557_94ba_1242fb2cc9a6);
}
impl ::core::convert::From<IPropertyEnumTypeList> for ::windows::core::IUnknown {
fn from(value: IPropertyEnumTypeList) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyEnumTypeList> for ::windows::core::IUnknown {
fn from(value: &IPropertyEnumTypeList) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyEnumTypeList {
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 IPropertyEnumTypeList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyEnumTypeList_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctypes: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itype: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, nindex: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propvarcmp: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pnindex: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyStore(pub ::windows::core::IUnknown);
impl IPropertyStore {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt(&self, iprop: u32) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprop), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetValue(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn SetValue(&self, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(propvar)).ok()
}
pub unsafe fn Commit(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyStore {
type Vtable = IPropertyStore_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x886d8eeb_8cf2_4446_8d02_cdba1dbdcf99);
}
impl ::core::convert::From<IPropertyStore> for ::windows::core::IUnknown {
fn from(value: IPropertyStore) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyStore> for ::windows::core::IUnknown {
fn from(value: &IPropertyStore) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyStore {
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 IPropertyStore {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyStore_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cprops: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprop: u32, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, pv: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyStoreCache(pub ::windows::core::IUnknown);
impl IPropertyStoreCache {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt(&self, iprop: u32) -> ::windows::core::Result<PROPERTYKEY> {
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprop), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetValue(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn SetValue(&self, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(propvar)).ok()
}
pub unsafe fn Commit(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn GetState(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<PSC_STATE> {
let mut result__: <PSC_STATE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<PSC_STATE>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetValueAndState(&self, key: *const PROPERTYKEY, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT, pstate: *mut PSC_STATE) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(ppropvar), ::core::mem::transmute(pstate)).ok()
}
pub unsafe fn SetState(&self, key: *const PROPERTYKEY, state: PSC_STATE) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(state)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn SetValueAndState(&self, key: *const PROPERTYKEY, ppropvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, state: PSC_STATE) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(ppropvar), ::core::mem::transmute(state)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyStoreCache {
type Vtable = IPropertyStoreCache_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3017056d_9a91_4e90_937d_746c72abbf4f);
}
impl ::core::convert::From<IPropertyStoreCache> for ::windows::core::IUnknown {
fn from(value: IPropertyStoreCache) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyStoreCache> for ::windows::core::IUnknown {
fn from(value: &IPropertyStoreCache) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyStoreCache {
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 IPropertyStoreCache {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPropertyStoreCache> for IPropertyStore {
fn from(value: IPropertyStoreCache) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPropertyStoreCache> for IPropertyStore {
fn from(value: &IPropertyStoreCache) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyStore> for IPropertyStoreCache {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyStore> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPropertyStore> for &IPropertyStoreCache {
fn into_param(self) -> ::windows::core::Param<'a, IPropertyStore> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyStoreCache_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cprops: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprop: u32, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, pv: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, pstate: *mut PSC_STATE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pstate: *mut PSC_STATE) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, state: PSC_STATE) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, ppropvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, state: PSC_STATE) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyStoreCapabilities(pub ::windows::core::IUnknown);
impl IPropertyStoreCapabilities {
pub unsafe fn IsPropertyWritable(&self, key: *const PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyStoreCapabilities {
type Vtable = IPropertyStoreCapabilities_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8e2d566_186e_4d49_bf41_6909ead56acc);
}
impl ::core::convert::From<IPropertyStoreCapabilities> for ::windows::core::IUnknown {
fn from(value: IPropertyStoreCapabilities) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyStoreCapabilities> for ::windows::core::IUnknown {
fn from(value: &IPropertyStoreCapabilities) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyStoreCapabilities {
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 IPropertyStoreCapabilities {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyStoreCapabilities_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyStoreFactory(pub ::windows::core::IUnknown);
impl IPropertyStoreFactory {
pub unsafe fn GetPropertyStore<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, T: ::windows::core::Interface>(&self, flags: GETPROPERTYSTOREFLAGS, punkfactory: Param1) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags), punkfactory.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn GetPropertyStoreForKeys<T: ::windows::core::Interface>(&self, rgkeys: *const PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(rgkeys), ::core::mem::transmute(ckeys), ::core::mem::transmute(flags), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
}
unsafe impl ::windows::core::Interface for IPropertyStoreFactory {
type Vtable = IPropertyStoreFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbc110b6d_57e8_4148_a9c6_91015ab2f3a5);
}
impl ::core::convert::From<IPropertyStoreFactory> for ::windows::core::IUnknown {
fn from(value: IPropertyStoreFactory) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyStoreFactory> for ::windows::core::IUnknown {
fn from(value: &IPropertyStoreFactory) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyStoreFactory {
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 IPropertyStoreFactory {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyStoreFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: GETPROPERTYSTOREFLAGS, punkfactory: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rgkeys: *const PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertySystem(pub ::windows::core::IUnknown);
impl IPropertySystem {
pub unsafe fn GetPropertyDescription<T: ::windows::core::Interface>(&self, propkey: *const PROPERTYKEY) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(propkey), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPropertyDescriptionByName<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, T: ::windows::core::Interface>(&self, pszcanonicalname: Param0) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszcanonicalname.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPropertyDescriptionListFromString<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, T: ::windows::core::Interface>(&self, pszproplist: Param0) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszproplist.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
pub unsafe fn EnumeratePropertyDescriptions<T: ::windows::core::Interface>(&self, filteron: PROPDESC_ENUMFILTER) -> ::windows::core::Result<T> {
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(filteron), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdff: PROPDESC_FORMAT_FLAGS, psztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(propvar), ::core::mem::transmute(pdff), ::core::mem::transmute(psztext), ::core::mem::transmute(cchtext)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplayAlloc(&self, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdff: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(propvar), ::core::mem::transmute(pdff), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn RegisterPropertySchema<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszpath: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), pszpath.into_param().abi()).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn UnregisterPropertySchema<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszpath: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pszpath.into_param().abi()).ok()
}
pub unsafe fn RefreshPropertySchema(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertySystem {
type Vtable = IPropertySystem_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca724e8a_c3e6_442b_88a4_6fb0db8035a3);
}
impl ::core::convert::From<IPropertySystem> for ::windows::core::IUnknown {
fn from(value: IPropertySystem) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertySystem> for ::windows::core::IUnknown {
fn from(value: &IPropertySystem) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertySystem {
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 IPropertySystem {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertySystem_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propkey: *const PROPERTYKEY, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszcanonicalname: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszproplist: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, filteron: PROPDESC_ENUMFILTER, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdff: PROPDESC_FORMAT_FLAGS, psztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdff: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpath: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpath: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertySystemChangeNotify(pub ::windows::core::IUnknown);
impl IPropertySystemChangeNotify {
pub unsafe fn SchemaRefreshed(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertySystemChangeNotify {
type Vtable = IPropertySystemChangeNotify_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfa955fd9_38be_4879_a6ce_824cf52d609f);
}
impl ::core::convert::From<IPropertySystemChangeNotify> for ::windows::core::IUnknown {
fn from(value: IPropertySystemChangeNotify) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertySystemChangeNotify> for ::windows::core::IUnknown {
fn from(value: &IPropertySystemChangeNotify) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertySystemChangeNotify {
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 IPropertySystemChangeNotify {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertySystemChangeNotify_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPropertyUI(pub ::windows::core::IUnknown);
impl IPropertyUI {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn ParsePropertyName<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszname: Param0, pfmtid: *mut ::windows::core::GUID, ppid: *mut u32, pcheaten: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszname.into_param().abi(), ::core::mem::transmute(pfmtid), ::core::mem::transmute(ppid), ::core::mem::transmute(pcheaten)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetCannonicalName(&self, fmtid: *const ::windows::core::GUID, pid: u32, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), ::core::mem::transmute(pwsztext), ::core::mem::transmute(cchtext)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDisplayName(&self, fmtid: *const ::windows::core::GUID, pid: u32, flags: PROPERTYUI_NAME_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), ::core::mem::transmute(flags), ::core::mem::transmute(pwsztext), ::core::mem::transmute(cchtext)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPropertyDescription(&self, fmtid: *const ::windows::core::GUID, pid: u32, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), ::core::mem::transmute(pwsztext), ::core::mem::transmute(cchtext)).ok()
}
pub unsafe fn GetDefaultWidth(&self, fmtid: *const ::windows::core::GUID, pid: u32) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetFlags(&self, fmtid: *const ::windows::core::GUID, pid: u32) -> ::windows::core::Result<PROPERTYUI_FLAGS> {
let mut result__: <PROPERTYUI_FLAGS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), &mut result__).from_abi::<PROPERTYUI_FLAGS>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn FormatForDisplay(&self, fmtid: *const ::windows::core::GUID, pid: u32, ppropvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, puiff: PROPERTYUI_FORMAT_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), ::core::mem::transmute(ppropvar), ::core::mem::transmute(puiff), ::core::mem::transmute(pwsztext), ::core::mem::transmute(cchtext)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetHelpInfo(&self, fmtid: *const ::windows::core::GUID, pid: u32, pwszhelpfile: super::super::super::Foundation::PWSTR, cch: u32, puhelpid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmtid), ::core::mem::transmute(pid), ::core::mem::transmute(pwszhelpfile), ::core::mem::transmute(cch), ::core::mem::transmute(puhelpid)).ok()
}
}
unsafe impl ::windows::core::Interface for IPropertyUI {
type Vtable = IPropertyUI_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x757a7d9f_919a_4118_99d7_dbb208c8cc66);
}
impl ::core::convert::From<IPropertyUI> for ::windows::core::IUnknown {
fn from(value: IPropertyUI) -> Self {
value.0
}
}
impl ::core::convert::From<&IPropertyUI> for ::windows::core::IUnknown {
fn from(value: &IPropertyUI) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyUI {
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 IPropertyUI {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPropertyUI_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::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, pszname: super::super::super::Foundation::PWSTR, pfmtid: *mut ::windows::core::GUID, ppid: *mut u32, pcheaten: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, flags: PROPERTYUI_NAME_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, pcxchars: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, pflags: *mut PROPERTYUI_FLAGS) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, ppropvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, puiff: PROPERTYUI_FORMAT_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pid: u32, pwszhelpfile: super::super::super::Foundation::PWSTR, cch: u32, puhelpid: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
pub const InMemoryPropertyStore: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9a02e012_6303_4e1e_b9a1_630f802592c5);
pub const InMemoryPropertyStoreMarshalByValue: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd4ca0e2d_6da7_4b75_a97c_5f306f0eaedc);
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromBooleanVector(prgf: *const super::super::super::Foundation::BOOL, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromBooleanVector(prgf: *const super::super::super::Foundation::BOOL, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromBooleanVector(::core::mem::transmute(prgf), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromBuffer(pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromBuffer(pv: *const ::core::ffi::c_void, cb: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromBuffer(::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromCLSID(clsid: *const ::windows::core::GUID) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromCLSID(clsid: *const ::windows::core::GUID, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromCLSID(::core::mem::transmute(clsid), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromDoubleVector(prgn: *const f64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromDoubleVector(prgn: *const f64, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromDoubleVector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromFileTime(pftin: *const super::super::super::Foundation::FILETIME) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromFileTime(pftin: *const super::super::super::Foundation::FILETIME, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromFileTime(::core::mem::transmute(pftin), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromFileTimeVector(prgft: *const super::super::super::Foundation::FILETIME, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromFileTimeVector(prgft: *const super::super::super::Foundation::FILETIME, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromFileTimeVector(::core::mem::transmute(prgft), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromGUIDAsString(guid: *const ::windows::core::GUID) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromGUIDAsString(guid: *const ::windows::core::GUID, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromGUIDAsString(::core::mem::transmute(guid), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromInt16Vector(prgn: *const i16, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromInt16Vector(prgn: *const i16, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromInt16Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromInt32Vector(prgn: *const i32, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromInt32Vector(prgn: *const i32, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromInt32Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromInt64Vector(prgn: *const i64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromInt64Vector(prgn: *const i64, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromInt64Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromPropVariantVectorElem(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromPropVariantVectorElem(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromPropVariantVectorElem(::core::mem::transmute(propvarin), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromResource<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HINSTANCE>>(hinst: Param0, id: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromResource(hinst: super::super::super::Foundation::HINSTANCE, id: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromResource(hinst.into_param().abi(), ::core::mem::transmute(id), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_Common"))]
#[inline]
pub unsafe fn InitPropVariantFromStrRet(pstrret: *mut super::Common::STRRET, pidl: *const super::Common::ITEMIDLIST, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromStrRet(pstrret: *mut super::Common::STRRET, pidl: *const super::Common::ITEMIDLIST, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
InitPropVariantFromStrRet(::core::mem::transmute(pstrret), ::core::mem::transmute(pidl), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromStringAsVector<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(psz: Param0) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromStringAsVector(psz: super::super::super::Foundation::PWSTR, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromStringAsVector(psz.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromStringVector(prgsz: *const super::super::super::Foundation::PWSTR, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromStringVector(prgsz: *const super::super::super::Foundation::PWSTR, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromStringVector(::core::mem::transmute(prgsz), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromUInt16Vector(prgn: *const u16, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromUInt16Vector(prgn: *const u16, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromUInt16Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromUInt32Vector(prgn: *const u32, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromUInt32Vector(prgn: *const u32, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromUInt32Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantFromUInt64Vector(prgn: *const u64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantFromUInt64Vector(prgn: *const u64, celems: u32, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantFromUInt64Vector(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn InitPropVariantVectorFromPropVariant(propvarsingle: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitPropVariantVectorFromPropVariant(propvarsingle: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppropvarvector: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitPropVariantVectorFromPropVariant(::core::mem::transmute(propvarsingle), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromBooleanArray(prgf: *const super::super::super::Foundation::BOOL, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromBooleanArray(prgf: *const super::super::super::Foundation::BOOL, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromBooleanArray(::core::mem::transmute(prgf), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromBuffer(pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromBuffer(pv: *const ::core::ffi::c_void, cb: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromBuffer(::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromDoubleArray(prgn: *const f64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromDoubleArray(prgn: *const f64, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromDoubleArray(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromFileTime(pft: *const super::super::super::Foundation::FILETIME) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromFileTime(pft: *const super::super::super::Foundation::FILETIME, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromFileTime(::core::mem::transmute(pft), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromFileTimeArray(prgft: *const super::super::super::Foundation::FILETIME, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromFileTimeArray(prgft: *const super::super::super::Foundation::FILETIME, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromFileTimeArray(::core::mem::transmute(prgft), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromGUIDAsString(guid: *const ::windows::core::GUID) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromGUIDAsString(guid: *const ::windows::core::GUID, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromGUIDAsString(::core::mem::transmute(guid), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromInt16Array(prgn: *const i16, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromInt16Array(prgn: *const i16, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromInt16Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromInt32Array(prgn: *const i32, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromInt32Array(prgn: *const i32, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromInt32Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromInt64Array(prgn: *const i64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromInt64Array(prgn: *const i64, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromInt64Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromResource<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HINSTANCE>>(hinst: Param0, id: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromResource(hinst: super::super::super::Foundation::HINSTANCE, id: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromResource(hinst.into_param().abi(), ::core::mem::transmute(id), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))]
#[inline]
pub unsafe fn InitVariantFromStrRet(pstrret: *const super::Common::STRRET, pidl: *const super::Common::ITEMIDLIST) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromStrRet(pstrret: *const super::Common::STRRET, pidl: *const super::Common::ITEMIDLIST, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromStrRet(::core::mem::transmute(pstrret), ::core::mem::transmute(pidl), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromStringArray(prgsz: *const super::super::super::Foundation::PWSTR, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromStringArray(prgsz: *const super::super::super::Foundation::PWSTR, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromStringArray(::core::mem::transmute(prgsz), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromUInt16Array(prgn: *const u16, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromUInt16Array(prgn: *const u16, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromUInt16Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromUInt32Array(prgn: *const u32, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromUInt32Array(prgn: *const u32, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromUInt32Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromUInt64Array(prgn: *const u64, celems: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromUInt64Array(prgn: *const u64, celems: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromUInt64Array(::core::mem::transmute(prgn), ::core::mem::transmute(celems), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn InitVariantFromVariantArrayElem(varin: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn InitVariantFromVariantArrayElem(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
InitVariantFromVariantArrayElem(::core::mem::transmute(varin), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PDOPSTATUS(pub i32);
pub const PDOPS_RUNNING: PDOPSTATUS = PDOPSTATUS(1i32);
pub const PDOPS_PAUSED: PDOPSTATUS = PDOPSTATUS(2i32);
pub const PDOPS_CANCELLED: PDOPSTATUS = PDOPSTATUS(3i32);
pub const PDOPS_STOPPED: PDOPSTATUS = PDOPSTATUS(4i32);
pub const PDOPS_ERRORS: PDOPSTATUS = PDOPSTATUS(5i32);
impl ::core::convert::From<i32> for PDOPSTATUS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PDOPSTATUS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PKA_FLAGS(pub i32);
pub const PKA_SET: PKA_FLAGS = PKA_FLAGS(0i32);
pub const PKA_APPEND: PKA_FLAGS = PKA_FLAGS(1i32);
pub const PKA_DELETE: PKA_FLAGS = PKA_FLAGS(2i32);
impl ::core::convert::From<i32> for PKA_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PKA_FLAGS {
type Abi = Self;
}
pub const PKEY_PIDSTR_MAX: u32 = 10u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PLACEHOLDER_STATES(pub i32);
pub const PS_NONE: PLACEHOLDER_STATES = PLACEHOLDER_STATES(0i32);
pub const PS_MARKED_FOR_OFFLINE_AVAILABILITY: PLACEHOLDER_STATES = PLACEHOLDER_STATES(1i32);
pub const PS_FULL_PRIMARY_STREAM_AVAILABLE: PLACEHOLDER_STATES = PLACEHOLDER_STATES(2i32);
pub const PS_CREATE_FILE_ACCESSIBLE: PLACEHOLDER_STATES = PLACEHOLDER_STATES(4i32);
pub const PS_CLOUDFILE_PLACEHOLDER: PLACEHOLDER_STATES = PLACEHOLDER_STATES(8i32);
pub const PS_DEFAULT: PLACEHOLDER_STATES = PLACEHOLDER_STATES(7i32);
pub const PS_ALL: PLACEHOLDER_STATES = PLACEHOLDER_STATES(15i32);
impl ::core::convert::From<i32> for PLACEHOLDER_STATES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PLACEHOLDER_STATES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_AGGREGATION_TYPE(pub i32);
pub const PDAT_DEFAULT: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(0i32);
pub const PDAT_FIRST: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(1i32);
pub const PDAT_SUM: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(2i32);
pub const PDAT_AVERAGE: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(3i32);
pub const PDAT_DATERANGE: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(4i32);
pub const PDAT_UNION: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(5i32);
pub const PDAT_MAX: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(6i32);
pub const PDAT_MIN: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(7i32);
impl ::core::convert::From<i32> for PROPDESC_AGGREGATION_TYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_AGGREGATION_TYPE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_COLUMNINDEX_TYPE(pub i32);
pub const PDCIT_NONE: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(0i32);
pub const PDCIT_ONDISK: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(1i32);
pub const PDCIT_INMEMORY: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(2i32);
pub const PDCIT_ONDEMAND: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(3i32);
pub const PDCIT_ONDISKALL: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(4i32);
pub const PDCIT_ONDISKVECTOR: PROPDESC_COLUMNINDEX_TYPE = PROPDESC_COLUMNINDEX_TYPE(5i32);
impl ::core::convert::From<i32> for PROPDESC_COLUMNINDEX_TYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_COLUMNINDEX_TYPE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_CONDITION_TYPE(pub i32);
pub const PDCOT_NONE: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(0i32);
pub const PDCOT_STRING: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(1i32);
pub const PDCOT_SIZE: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(2i32);
pub const PDCOT_DATETIME: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(3i32);
pub const PDCOT_BOOLEAN: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(4i32);
pub const PDCOT_NUMBER: PROPDESC_CONDITION_TYPE = PROPDESC_CONDITION_TYPE(5i32);
impl ::core::convert::From<i32> for PROPDESC_CONDITION_TYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_CONDITION_TYPE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_DISPLAYTYPE(pub i32);
pub const PDDT_STRING: PROPDESC_DISPLAYTYPE = PROPDESC_DISPLAYTYPE(0i32);
pub const PDDT_NUMBER: PROPDESC_DISPLAYTYPE = PROPDESC_DISPLAYTYPE(1i32);
pub const PDDT_BOOLEAN: PROPDESC_DISPLAYTYPE = PROPDESC_DISPLAYTYPE(2i32);
pub const PDDT_DATETIME: PROPDESC_DISPLAYTYPE = PROPDESC_DISPLAYTYPE(3i32);
pub const PDDT_ENUMERATED: PROPDESC_DISPLAYTYPE = PROPDESC_DISPLAYTYPE(4i32);
impl ::core::convert::From<i32> for PROPDESC_DISPLAYTYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_DISPLAYTYPE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_ENUMFILTER(pub i32);
pub const PDEF_ALL: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(0i32);
pub const PDEF_SYSTEM: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(1i32);
pub const PDEF_NONSYSTEM: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(2i32);
pub const PDEF_VIEWABLE: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(3i32);
pub const PDEF_QUERYABLE: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(4i32);
pub const PDEF_INFULLTEXTQUERY: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(5i32);
pub const PDEF_COLUMN: PROPDESC_ENUMFILTER = PROPDESC_ENUMFILTER(6i32);
impl ::core::convert::From<i32> for PROPDESC_ENUMFILTER {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_ENUMFILTER {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_FORMAT_FLAGS(pub i32);
pub const PDFF_DEFAULT: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(0i32);
pub const PDFF_PREFIXNAME: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(1i32);
pub const PDFF_FILENAME: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(2i32);
pub const PDFF_ALWAYSKB: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(4i32);
pub const PDFF_RESERVED_RIGHTTOLEFT: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(8i32);
pub const PDFF_SHORTTIME: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(16i32);
pub const PDFF_LONGTIME: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(32i32);
pub const PDFF_HIDETIME: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(64i32);
pub const PDFF_SHORTDATE: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(128i32);
pub const PDFF_LONGDATE: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(256i32);
pub const PDFF_HIDEDATE: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(512i32);
pub const PDFF_RELATIVEDATE: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(1024i32);
pub const PDFF_USEEDITINVITATION: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(2048i32);
pub const PDFF_READONLY: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(4096i32);
pub const PDFF_NOAUTOREADINGORDER: PROPDESC_FORMAT_FLAGS = PROPDESC_FORMAT_FLAGS(8192i32);
impl ::core::convert::From<i32> for PROPDESC_FORMAT_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_FORMAT_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_GROUPING_RANGE(pub i32);
pub const PDGR_DISCRETE: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(0i32);
pub const PDGR_ALPHANUMERIC: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(1i32);
pub const PDGR_SIZE: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(2i32);
pub const PDGR_DYNAMIC: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(3i32);
pub const PDGR_DATE: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(4i32);
pub const PDGR_PERCENT: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(5i32);
pub const PDGR_ENUMERATED: PROPDESC_GROUPING_RANGE = PROPDESC_GROUPING_RANGE(6i32);
impl ::core::convert::From<i32> for PROPDESC_GROUPING_RANGE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_GROUPING_RANGE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_RELATIVEDESCRIPTION_TYPE(pub i32);
pub const PDRDT_GENERAL: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(0i32);
pub const PDRDT_DATE: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(1i32);
pub const PDRDT_SIZE: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(2i32);
pub const PDRDT_COUNT: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(3i32);
pub const PDRDT_REVISION: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(4i32);
pub const PDRDT_LENGTH: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(5i32);
pub const PDRDT_DURATION: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(6i32);
pub const PDRDT_SPEED: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(7i32);
pub const PDRDT_RATE: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(8i32);
pub const PDRDT_RATING: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(9i32);
pub const PDRDT_PRIORITY: PROPDESC_RELATIVEDESCRIPTION_TYPE = PROPDESC_RELATIVEDESCRIPTION_TYPE(10i32);
impl ::core::convert::From<i32> for PROPDESC_RELATIVEDESCRIPTION_TYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_RELATIVEDESCRIPTION_TYPE {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_SEARCHINFO_FLAGS(pub i32);
pub const PDSIF_DEFAULT: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(0i32);
pub const PDSIF_ININVERTEDINDEX: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(1i32);
pub const PDSIF_ISCOLUMN: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(2i32);
pub const PDSIF_ISCOLUMNSPARSE: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(4i32);
pub const PDSIF_ALWAYSINCLUDE: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(8i32);
pub const PDSIF_USEFORTYPEAHEAD: PROPDESC_SEARCHINFO_FLAGS = PROPDESC_SEARCHINFO_FLAGS(16i32);
impl ::core::convert::From<i32> for PROPDESC_SEARCHINFO_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_SEARCHINFO_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_SORTDESCRIPTION(pub i32);
pub const PDSD_GENERAL: PROPDESC_SORTDESCRIPTION = PROPDESC_SORTDESCRIPTION(0i32);
pub const PDSD_A_Z: PROPDESC_SORTDESCRIPTION = PROPDESC_SORTDESCRIPTION(1i32);
pub const PDSD_LOWEST_HIGHEST: PROPDESC_SORTDESCRIPTION = PROPDESC_SORTDESCRIPTION(2i32);
pub const PDSD_SMALLEST_BIGGEST: PROPDESC_SORTDESCRIPTION = PROPDESC_SORTDESCRIPTION(3i32);
pub const PDSD_OLDEST_NEWEST: PROPDESC_SORTDESCRIPTION = PROPDESC_SORTDESCRIPTION(4i32);
impl ::core::convert::From<i32> for PROPDESC_SORTDESCRIPTION {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_SORTDESCRIPTION {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_TYPE_FLAGS(pub i32);
pub const PDTF_DEFAULT: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(0i32);
pub const PDTF_MULTIPLEVALUES: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(1i32);
pub const PDTF_ISINNATE: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(2i32);
pub const PDTF_ISGROUP: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(4i32);
pub const PDTF_CANGROUPBY: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(8i32);
pub const PDTF_CANSTACKBY: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(16i32);
pub const PDTF_ISTREEPROPERTY: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(32i32);
pub const PDTF_INCLUDEINFULLTEXTQUERY: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(64i32);
pub const PDTF_ISVIEWABLE: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(128i32);
pub const PDTF_ISQUERYABLE: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(256i32);
pub const PDTF_CANBEPURGED: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(512i32);
pub const PDTF_SEARCHRAWVALUE: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(1024i32);
pub const PDTF_DONTCOERCEEMPTYSTRINGS: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(2048i32);
pub const PDTF_ALWAYSINSUPPLEMENTALSTORE: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(4096i32);
pub const PDTF_ISSYSTEMPROPERTY: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(-2147483648i32);
pub const PDTF_MASK_ALL: PROPDESC_TYPE_FLAGS = PROPDESC_TYPE_FLAGS(-2147475457i32);
impl ::core::convert::From<i32> for PROPDESC_TYPE_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_TYPE_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPDESC_VIEW_FLAGS(pub i32);
pub const PDVF_DEFAULT: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(0i32);
pub const PDVF_CENTERALIGN: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(1i32);
pub const PDVF_RIGHTALIGN: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(2i32);
pub const PDVF_BEGINNEWGROUP: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(4i32);
pub const PDVF_FILLAREA: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(8i32);
pub const PDVF_SORTDESCENDING: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(16i32);
pub const PDVF_SHOWONLYIFPRESENT: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(32i32);
pub const PDVF_SHOWBYDEFAULT: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(64i32);
pub const PDVF_SHOWINPRIMARYLIST: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(128i32);
pub const PDVF_SHOWINSECONDARYLIST: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(256i32);
pub const PDVF_HIDELABEL: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(512i32);
pub const PDVF_HIDDEN: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(2048i32);
pub const PDVF_CANWRAP: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(4096i32);
pub const PDVF_MASK_ALL: PROPDESC_VIEW_FLAGS = PROPDESC_VIEW_FLAGS(7167i32);
impl ::core::convert::From<i32> for PROPDESC_VIEW_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPDESC_VIEW_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPENUMTYPE(pub i32);
pub const PET_DISCRETEVALUE: PROPENUMTYPE = PROPENUMTYPE(0i32);
pub const PET_RANGEDVALUE: PROPENUMTYPE = PROPENUMTYPE(1i32);
pub const PET_DEFAULTVALUE: PROPENUMTYPE = PROPENUMTYPE(2i32);
pub const PET_ENDRANGE: PROPENUMTYPE = PROPENUMTYPE(3i32);
impl ::core::convert::From<i32> for PROPENUMTYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPENUMTYPE {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C)]
pub struct PROPERTYKEY {
pub fmtid: ::windows::core::GUID,
pub pid: u32,
}
impl PROPERTYKEY {}
impl ::core::default::Default for PROPERTYKEY {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for PROPERTYKEY {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.debug_struct("PROPERTYKEY").field("fmtid", &self.fmtid).field("pid", &self.pid).finish()
}
}
impl ::core::cmp::PartialEq for PROPERTYKEY {
fn eq(&self, other: &Self) -> bool {
self.fmtid == other.fmtid && self.pid == other.pid
}
}
impl ::core::cmp::Eq for PROPERTYKEY {}
unsafe impl ::windows::core::Abi for PROPERTYKEY {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPERTYUI_FLAGS(pub i32);
pub const PUIF_DEFAULT: PROPERTYUI_FLAGS = PROPERTYUI_FLAGS(0i32);
pub const PUIF_RIGHTALIGN: PROPERTYUI_FLAGS = PROPERTYUI_FLAGS(1i32);
pub const PUIF_NOLABELININFOTIP: PROPERTYUI_FLAGS = PROPERTYUI_FLAGS(2i32);
impl ::core::convert::From<i32> for PROPERTYUI_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPERTYUI_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPERTYUI_FORMAT_FLAGS(pub i32);
pub const PUIFFDF_DEFAULT: PROPERTYUI_FORMAT_FLAGS = PROPERTYUI_FORMAT_FLAGS(0i32);
pub const PUIFFDF_RIGHTTOLEFT: PROPERTYUI_FORMAT_FLAGS = PROPERTYUI_FORMAT_FLAGS(1i32);
pub const PUIFFDF_SHORTFORMAT: PROPERTYUI_FORMAT_FLAGS = PROPERTYUI_FORMAT_FLAGS(2i32);
pub const PUIFFDF_NOTIME: PROPERTYUI_FORMAT_FLAGS = PROPERTYUI_FORMAT_FLAGS(4i32);
pub const PUIFFDF_FRIENDLYDATE: PROPERTYUI_FORMAT_FLAGS = PROPERTYUI_FORMAT_FLAGS(8i32);
impl ::core::convert::From<i32> for PROPERTYUI_FORMAT_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPERTYUI_FORMAT_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPERTYUI_NAME_FLAGS(pub i32);
pub const PUIFNF_DEFAULT: PROPERTYUI_NAME_FLAGS = PROPERTYUI_NAME_FLAGS(0i32);
pub const PUIFNF_MNEMONIC: PROPERTYUI_NAME_FLAGS = PROPERTYUI_NAME_FLAGS(1i32);
impl ::core::convert::From<i32> for PROPERTYUI_NAME_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPERTYUI_NAME_FLAGS {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
#[cfg(feature = "Win32_Foundation")]
pub struct PROPPRG {
pub flPrg: u16,
pub flPrgInit: u16,
pub achTitle: [super::super::super::Foundation::CHAR; 30],
pub achCmdLine: [super::super::super::Foundation::CHAR; 128],
pub achWorkDir: [super::super::super::Foundation::CHAR; 64],
pub wHotKey: u16,
pub achIconFile: [super::super::super::Foundation::CHAR; 80],
pub wIconIndex: u16,
pub dwEnhModeFlags: u32,
pub dwRealModeFlags: u32,
pub achOtherFile: [super::super::super::Foundation::CHAR; 80],
pub achPIFFile: [super::super::super::Foundation::CHAR; 260],
}
#[cfg(feature = "Win32_Foundation")]
impl PROPPRG {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::default::Default for PROPPRG {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::PartialEq for PROPPRG {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::Eq for PROPPRG {}
#[cfg(feature = "Win32_Foundation")]
unsafe impl ::windows::core::Abi for PROPPRG {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPVAR_CHANGE_FLAGS(pub i32);
pub const PVCHF_DEFAULT: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(0i32);
pub const PVCHF_NOVALUEPROP: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(1i32);
pub const PVCHF_ALPHABOOL: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(2i32);
pub const PVCHF_NOUSEROVERRIDE: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(4i32);
pub const PVCHF_LOCALBOOL: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(8i32);
pub const PVCHF_NOHEXSTRING: PROPVAR_CHANGE_FLAGS = PROPVAR_CHANGE_FLAGS(16i32);
impl ::core::convert::From<i32> for PROPVAR_CHANGE_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPVAR_CHANGE_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPVAR_COMPARE_FLAGS(pub i32);
pub const PVCF_DEFAULT: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(0i32);
pub const PVCF_TREATEMPTYASGREATERTHAN: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(1i32);
pub const PVCF_USESTRCMP: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(2i32);
pub const PVCF_USESTRCMPC: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(4i32);
pub const PVCF_USESTRCMPI: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(8i32);
pub const PVCF_USESTRCMPIC: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(16i32);
pub const PVCF_DIGITSASNUMBERS_CASESENSITIVE: PROPVAR_COMPARE_FLAGS = PROPVAR_COMPARE_FLAGS(32i32);
impl ::core::convert::From<i32> for PROPVAR_COMPARE_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPVAR_COMPARE_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PROPVAR_COMPARE_UNIT(pub i32);
pub const PVCU_DEFAULT: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(0i32);
pub const PVCU_SECOND: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(1i32);
pub const PVCU_MINUTE: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(2i32);
pub const PVCU_HOUR: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(3i32);
pub const PVCU_DAY: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(4i32);
pub const PVCU_MONTH: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(5i32);
pub const PVCU_YEAR: PROPVAR_COMPARE_UNIT = PROPVAR_COMPARE_UNIT(6i32);
impl ::core::convert::From<i32> for PROPVAR_COMPARE_UNIT {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PROPVAR_COMPARE_UNIT {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PSC_STATE(pub i32);
pub const PSC_NORMAL: PSC_STATE = PSC_STATE(0i32);
pub const PSC_NOTINSOURCE: PSC_STATE = PSC_STATE(1i32);
pub const PSC_DIRTY: PSC_STATE = PSC_STATE(2i32);
pub const PSC_READONLY: PSC_STATE = PSC_STATE(3i32);
impl ::core::convert::From<i32> for PSC_STATE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PSC_STATE {
type Abi = Self;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSCoerceToCanonicalValue(key: *const PROPERTYKEY, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCoerceToCanonicalValue(key: *const PROPERTYKEY, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
PSCoerceToCanonicalValue(::core::mem::transmute(key), ::core::mem::transmute(ppropvar)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSCreateAdapterFromPropertyStore<'a, Param0: ::windows::core::IntoParam<'a, IPropertyStore>>(pps: Param0, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreateAdapterFromPropertyStore(pps: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreateAdapterFromPropertyStore(pps.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSCreateDelayedMultiplexPropertyStore<'a, Param1: ::windows::core::IntoParam<'a, IDelayedPropertyStoreFactory>>(flags: GETPROPERTYSTOREFLAGS, pdpsf: Param1, rgstoreids: *const u32, cstores: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreateDelayedMultiplexPropertyStore(flags: GETPROPERTYSTOREFLAGS, pdpsf: ::windows::core::RawPtr, rgstoreids: *const u32, cstores: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreateDelayedMultiplexPropertyStore(::core::mem::transmute(flags), pdpsf.into_param().abi(), ::core::mem::transmute(rgstoreids), ::core::mem::transmute(cstores), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSCreateMemoryPropertyStore(riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreateMemoryPropertyStore(riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreateMemoryPropertyStore(::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSCreateMultiplexPropertyStore(prgpunkstores: *const ::core::option::Option<::windows::core::IUnknown>, cstores: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreateMultiplexPropertyStore(prgpunkstores: *const ::windows::core::RawPtr, cstores: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreateMultiplexPropertyStore(::core::mem::transmute(prgpunkstores), ::core::mem::transmute(cstores), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSCreatePropertyChangeArray(rgpropkey: *const PROPERTYKEY, rgflags: *const PKA_FLAGS, rgpropvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, cchanges: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreatePropertyChangeArray(rgpropkey: *const PROPERTYKEY, rgflags: *const PKA_FLAGS, rgpropvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, cchanges: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreatePropertyChangeArray(::core::mem::transmute(rgpropkey), ::core::mem::transmute(rgflags), ::core::mem::transmute(rgpropvar), ::core::mem::transmute(cchanges), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSCreatePropertyStoreFromObject<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(punk: Param0, grfmode: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreatePropertyStoreFromObject(punk: ::windows::core::RawPtr, grfmode: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreatePropertyStoreFromObject(punk.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
#[inline]
pub unsafe fn PSCreatePropertyStoreFromPropertySetStorage<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertySetStorage>>(ppss: Param0, grfmode: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreatePropertyStoreFromPropertySetStorage(ppss: ::windows::core::RawPtr, grfmode: u32, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreatePropertyStoreFromPropertySetStorage(ppss.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSCreateSimplePropertyChange(flags: PKA_FLAGS, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSCreateSimplePropertyChange(flags: PKA_FLAGS, key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSCreateSimplePropertyChange(::core::mem::transmute(flags), ::core::mem::transmute(key), ::core::mem::transmute(propvar), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSEnumeratePropertyDescriptions(filteron: PROPDESC_ENUMFILTER, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSEnumeratePropertyDescriptions(filteron: PROPDESC_ENUMFILTER, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSEnumeratePropertyDescriptions(::core::mem::transmute(filteron), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSFormatForDisplay(propkey: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSFormatForDisplay(propkey: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdfflags: PROPDESC_FORMAT_FLAGS, pwsztext: super::super::super::Foundation::PWSTR, cchtext: u32) -> ::windows::core::HRESULT;
}
PSFormatForDisplay(::core::mem::transmute(propkey), ::core::mem::transmute(propvar), ::core::mem::transmute(pdfflags), ::core::mem::transmute(pwsztext), ::core::mem::transmute(cchtext)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSFormatForDisplayAlloc(key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdff: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSFormatForDisplayAlloc(key: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdff: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSFormatForDisplayAlloc(::core::mem::transmute(key), ::core::mem::transmute(propvar), ::core::mem::transmute(pdff), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSFormatPropertyValue<'a, Param0: ::windows::core::IntoParam<'a, IPropertyStore>, Param1: ::windows::core::IntoParam<'a, IPropertyDescription>>(pps: Param0, ppd: Param1, pdff: PROPDESC_FORMAT_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSFormatPropertyValue(pps: ::windows::core::RawPtr, ppd: ::windows::core::RawPtr, pdff: PROPDESC_FORMAT_FLAGS, ppszdisplay: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSFormatPropertyValue(pps.into_param().abi(), ppd.into_param().abi(), ::core::mem::transmute(pdff), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSGetImageReferenceForValue(propkey: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetImageReferenceForValue(propkey: *const PROPERTYKEY, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszimageres: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetImageReferenceForValue(::core::mem::transmute(propkey), ::core::mem::transmute(propvar), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetItemPropertyHandler<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(punkitem: Param0, freadwrite: Param1, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetItemPropertyHandler(punkitem: ::windows::core::RawPtr, freadwrite: super::super::super::Foundation::BOOL, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetItemPropertyHandler(punkitem.into_param().abi(), freadwrite.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetItemPropertyHandlerWithCreateObject<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(punkitem: Param0, freadwrite: Param1, punkcreateobject: Param2, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetItemPropertyHandlerWithCreateObject(punkitem: ::windows::core::RawPtr, freadwrite: super::super::super::Foundation::BOOL, punkcreateobject: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetItemPropertyHandlerWithCreateObject(punkitem.into_param().abi(), freadwrite.into_param().abi(), punkcreateobject.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetNameFromPropertyKey(propkey: *const PROPERTYKEY) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetNameFromPropertyKey(propkey: *const PROPERTYKEY, ppszcanonicalname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetNameFromPropertyKey(::core::mem::transmute(propkey), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSGetNamedPropertyFromPropertyStorage<'a, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(psps: *const SERIALIZEDPROPSTORAGE, cb: u32, pszname: Param2) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetNamedPropertyFromPropertyStorage(psps: *const SERIALIZEDPROPSTORAGE, cb: u32, pszname: super::super::super::Foundation::PWSTR, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetNamedPropertyFromPropertyStorage(::core::mem::transmute(psps), ::core::mem::transmute(cb), pszname.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSGetPropertyDescription(propkey: *const PROPERTYKEY, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyDescription(propkey: *const PROPERTYKEY, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetPropertyDescription(::core::mem::transmute(propkey), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetPropertyDescriptionByName<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszcanonicalname: Param0, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyDescriptionByName(pszcanonicalname: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetPropertyDescriptionByName(pszcanonicalname.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetPropertyDescriptionListFromString<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszproplist: Param0, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyDescriptionListFromString(pszproplist: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetPropertyDescriptionListFromString(pszproplist.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSGetPropertyFromPropertyStorage(psps: *const SERIALIZEDPROPSTORAGE, cb: u32, rpkey: *const PROPERTYKEY) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyFromPropertyStorage(psps: *const SERIALIZEDPROPSTORAGE, cb: u32, rpkey: *const PROPERTYKEY, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetPropertyFromPropertyStorage(::core::mem::transmute(psps), ::core::mem::transmute(cb), ::core::mem::transmute(rpkey), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSGetPropertyKeyFromName<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszname: Param0) -> ::windows::core::Result<PROPERTYKEY> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyKeyFromName(pszname: super::super::super::Foundation::PWSTR, ppropkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT;
}
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetPropertyKeyFromName(pszname.into_param().abi(), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSGetPropertySystem(riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertySystem(riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSGetPropertySystem(::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSGetPropertyValue<'a, Param0: ::windows::core::IntoParam<'a, IPropertyStore>, Param1: ::windows::core::IntoParam<'a, IPropertyDescription>>(pps: Param0, ppd: Param1) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSGetPropertyValue(pps: ::windows::core::RawPtr, ppd: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSGetPropertyValue(pps.into_param().abi(), ppd.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSLookupPropertyHandlerCLSID<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszfilepath: Param0) -> ::windows::core::Result<::windows::core::GUID> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSLookupPropertyHandlerCLSID(pszfilepath: super::super::super::Foundation::PWSTR, pclsid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT;
}
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSLookupPropertyHandlerCLSID(pszfilepath.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_Delete(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
PSPropertyBag_Delete(propbag.into_param().abi(), propname.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadBOOL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadBOOL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadBOOL(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadBSTR<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::BSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadBSTR(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadBSTR(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadDWORD<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<u32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadDWORD(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut u32) -> ::windows::core::HRESULT;
}
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadDWORD(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<u32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadGUID<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<::windows::core::GUID> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadGUID(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut ::windows::core::GUID) -> ::windows::core::HRESULT;
}
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadGUID(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadInt<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadInt(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadInt(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadLONG<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadLONG(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadLONG(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadPOINTL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::POINTL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadPOINTL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut super::super::super::Foundation::POINTL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::POINTL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadPOINTL(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::POINTL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadPOINTS<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::POINTS> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadPOINTS(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut super::super::super::Foundation::POINTS) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::POINTS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadPOINTS(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::POINTS>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadPropertyKey<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<PROPERTYKEY> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadPropertyKey(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut PROPERTYKEY) -> ::windows::core::HRESULT;
}
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadPropertyKey(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadRECTL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::RECTL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadRECTL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut super::super::super::Foundation::RECTL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::RECTL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadRECTL(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::RECTL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadSHORT<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<i16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadSHORT(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut i16) -> ::windows::core::HRESULT;
}
let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadSHORT(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<i16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadStr<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: super::super::super::Foundation::PWSTR, charactercount: i32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadStr(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: super::super::super::Foundation::PWSTR, charactercount: i32) -> ::windows::core::HRESULT;
}
PSPropertyBag_ReadStr(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value), ::core::mem::transmute(charactercount)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadStrAlloc<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadStrAlloc(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadStrAlloc(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<super::super::super::System::Com::IStream> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadStream(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadStream(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::IStream>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadType<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, var: *mut super::super::super::System::Com::VARIANT, r#type: u16) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadType(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, var: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, r#type: u16) -> ::windows::core::HRESULT;
}
PSPropertyBag_ReadType(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(var), ::core::mem::transmute(r#type)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadULONGLONG<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1) -> ::windows::core::Result<u64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadULONGLONG(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *mut u64) -> ::windows::core::HRESULT;
}
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyBag_ReadULONGLONG(propbag.into_param().abi(), propname.into_param().abi(), &mut result__).from_abi::<u64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_ReadUnknown<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_ReadUnknown(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PSPropertyBag_ReadUnknown(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteBOOL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(propbag: Param0, propname: Param1, value: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteBOOL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteBOOL(propbag.into_param().abi(), propname.into_param().abi(), value.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteBSTR<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::BSTR>>(propbag: Param0, propname: Param1, value: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteBSTR(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteBSTR(propbag.into_param().abi(), propname.into_param().abi(), value.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteDWORD<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteDWORD(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: u32) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteDWORD(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteGUID<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: *const ::windows::core::GUID) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteGUID(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *const ::windows::core::GUID) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteGUID(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteInt<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: i32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteInt(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: i32) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteInt(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteLONG<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: i32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteLONG(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: i32) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteLONG(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WritePOINTL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: *const super::super::super::Foundation::POINTL) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WritePOINTL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *const super::super::super::Foundation::POINTL) -> ::windows::core::HRESULT;
}
PSPropertyBag_WritePOINTL(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WritePOINTS<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: *const super::super::super::Foundation::POINTS) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WritePOINTS(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *const super::super::super::Foundation::POINTS) -> ::windows::core::HRESULT;
}
PSPropertyBag_WritePOINTS(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WritePropertyKey<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: *const PROPERTYKEY) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WritePropertyKey(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *const PROPERTYKEY) -> ::windows::core::HRESULT;
}
PSPropertyBag_WritePropertyKey(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteRECTL<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: *const super::super::super::Foundation::RECTL) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteRECTL(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: *const super::super::super::Foundation::RECTL) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteRECTL(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteSHORT<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: i16) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteSHORT(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: i16) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteSHORT(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteStr<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteStr(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteStr(propbag.into_param().abi(), propname.into_param().abi(), value.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::System::Com::IStream>>(propbag: Param0, propname: Param1, value: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteStream(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteStream(propbag.into_param().abi(), propname.into_param().abi(), value.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteULONGLONG<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propbag: Param0, propname: Param1, value: u64) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteULONGLONG(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, value: u64) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteULONGLONG(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSPropertyBag_WriteUnknown<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyBag>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(propbag: Param0, propname: Param1, punk: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyBag_WriteUnknown(propbag: ::windows::core::RawPtr, propname: super::super::super::Foundation::PWSTR, punk: ::windows::core::RawPtr) -> ::windows::core::HRESULT;
}
PSPropertyBag_WriteUnknown(propbag.into_param().abi(), propname.into_param().abi(), punk.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSPropertyKeyFromString<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszstring: Param0) -> ::windows::core::Result<PROPERTYKEY> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSPropertyKeyFromString(pszstring: super::super::super::Foundation::PWSTR, pkey: *mut PROPERTYKEY) -> ::windows::core::HRESULT;
}
let mut result__: <PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PSPropertyKeyFromString(pszstring.into_param().abi(), &mut result__).from_abi::<PROPERTYKEY>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn PSRefreshPropertySchema() -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSRefreshPropertySchema() -> ::windows::core::HRESULT;
}
PSRefreshPropertySchema().ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSRegisterPropertySchema<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszpath: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSRegisterPropertySchema(pszpath: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
PSRegisterPropertySchema(pszpath.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PSSetPropertyValue<'a, Param0: ::windows::core::IntoParam<'a, IPropertyStore>, Param1: ::windows::core::IntoParam<'a, IPropertyDescription>>(pps: Param0, ppd: Param1, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSSetPropertyValue(pps: ::windows::core::RawPtr, ppd: ::windows::core::RawPtr, propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
PSSetPropertyValue(pps.into_param().abi(), ppd.into_param().abi(), ::core::mem::transmute(propvar)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSStringFromPropertyKey(pkey: *const PROPERTYKEY, psz: super::super::super::Foundation::PWSTR, cch: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSStringFromPropertyKey(pkey: *const PROPERTYKEY, psz: super::super::super::Foundation::PWSTR, cch: u32) -> ::windows::core::HRESULT;
}
PSStringFromPropertyKey(::core::mem::transmute(pkey), ::core::mem::transmute(psz), ::core::mem::transmute(cch)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct PSTIME_FLAGS(pub i32);
pub const PSTF_UTC: PSTIME_FLAGS = PSTIME_FLAGS(0i32);
pub const PSTF_LOCAL: PSTIME_FLAGS = PSTIME_FLAGS(1i32);
impl ::core::convert::From<i32> for PSTIME_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for PSTIME_FLAGS {
type Abi = Self;
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PSUnregisterPropertySchema<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszpath: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PSUnregisterPropertySchema(pszpath: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
PSUnregisterPropertySchema(pszpath.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PifMgr_CloseProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HANDLE>>(hprops: Param0, flopt: u32) -> super::super::super::Foundation::HANDLE {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PifMgr_CloseProperties(hprops: super::super::super::Foundation::HANDLE, flopt: u32) -> super::super::super::Foundation::HANDLE;
}
::core::mem::transmute(PifMgr_CloseProperties(hprops.into_param().abi(), ::core::mem::transmute(flopt)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PifMgr_GetProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(hprops: Param0, pszgroup: Param1, lpprops: *mut ::core::ffi::c_void, cbprops: i32, flopt: u32) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PifMgr_GetProperties(hprops: super::super::super::Foundation::HANDLE, pszgroup: super::super::super::Foundation::PSTR, lpprops: *mut ::core::ffi::c_void, cbprops: i32, flopt: u32) -> i32;
}
::core::mem::transmute(PifMgr_GetProperties(hprops.into_param().abi(), pszgroup.into_param().abi(), ::core::mem::transmute(lpprops), ::core::mem::transmute(cbprops), ::core::mem::transmute(flopt)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PifMgr_OpenProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pszapp: Param0, pszpif: Param1, hinf: u32, flopt: u32) -> super::super::super::Foundation::HANDLE {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PifMgr_OpenProperties(pszapp: super::super::super::Foundation::PWSTR, pszpif: super::super::super::Foundation::PWSTR, hinf: u32, flopt: u32) -> super::super::super::Foundation::HANDLE;
}
::core::mem::transmute(PifMgr_OpenProperties(pszapp.into_param().abi(), pszpif.into_param().abi(), ::core::mem::transmute(hinf), ::core::mem::transmute(flopt)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn PifMgr_SetProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(hprops: Param0, pszgroup: Param1, lpprops: *const ::core::ffi::c_void, cbprops: i32, flopt: u32) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PifMgr_SetProperties(hprops: super::super::super::Foundation::HANDLE, pszgroup: super::super::super::Foundation::PSTR, lpprops: *const ::core::ffi::c_void, cbprops: i32, flopt: u32) -> i32;
}
::core::mem::transmute(PifMgr_SetProperties(hprops.into_param().abi(), pszgroup.into_param().abi(), ::core::mem::transmute(lpprops), ::core::mem::transmute(cbprops), ::core::mem::transmute(flopt)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantChangeType(ppropvardest: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvarsrc: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, flags: PROPVAR_CHANGE_FLAGS, vt: u16) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantChangeType(ppropvardest: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvarsrc: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, flags: PROPVAR_CHANGE_FLAGS, vt: u16) -> ::windows::core::HRESULT;
}
PropVariantChangeType(::core::mem::transmute(ppropvardest), ::core::mem::transmute(propvarsrc), ::core::mem::transmute(flags), ::core::mem::transmute(vt)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantCompareEx(propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, unit: PROPVAR_COMPARE_UNIT, flags: PROPVAR_COMPARE_FLAGS) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantCompareEx(propvar1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propvar2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, unit: PROPVAR_COMPARE_UNIT, flags: PROPVAR_COMPARE_FLAGS) -> i32;
}
::core::mem::transmute(PropVariantCompareEx(::core::mem::transmute(propvar1), ::core::mem::transmute(propvar2), ::core::mem::transmute(unit), ::core::mem::transmute(flags)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetBooleanElem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetBooleanElem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pfval: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetBooleanElem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetDoubleElem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<f64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetDoubleElem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut f64) -> ::windows::core::HRESULT;
}
let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetDoubleElem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<f64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetElementCount(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> u32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetElementCount(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> u32;
}
::core::mem::transmute(PropVariantGetElementCount(::core::mem::transmute(propvar)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetFileTimeElem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::Foundation::FILETIME> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetFileTimeElem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pftval: *mut super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::FILETIME as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetFileTimeElem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::Foundation::FILETIME>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetInt16Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<i16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetInt16Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut i16) -> ::windows::core::HRESULT;
}
let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetInt16Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<i16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetInt32Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetInt32Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetInt32Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetInt64Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<i64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetInt64Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut i64) -> ::windows::core::HRESULT;
}
let mut result__: <i64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetInt64Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<i64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetStringElem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetStringElem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, ppszval: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetStringElem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetUInt16Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<u16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetUInt16Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut u16) -> ::windows::core::HRESULT;
}
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetUInt16Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<u16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetUInt32Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<u32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetUInt32Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut u32) -> ::windows::core::HRESULT;
}
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetUInt32Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<u32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantGetUInt64Elem(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ielem: u32) -> ::windows::core::Result<u64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantGetUInt64Elem(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ielem: u32, pnval: *mut u64) -> ::windows::core::HRESULT;
}
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantGetUInt64Elem(::core::mem::transmute(propvar), ::core::mem::transmute(ielem), &mut result__).from_abi::<u64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBSTR(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::Foundation::BSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBSTR(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pbstrout: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToBSTR(::core::mem::transmute(propvar), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBoolean(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBoolean(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pfret: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToBoolean(::core::mem::transmute(propvarin), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBooleanVector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgf: *mut super::super::super::Foundation::BOOL, crgf: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBooleanVector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgf: *mut super::super::super::Foundation::BOOL, crgf: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToBooleanVector(::core::mem::transmute(propvar), ::core::mem::transmute(prgf), ::core::mem::transmute(crgf), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBooleanVectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgf: *mut *mut super::super::super::Foundation::BOOL, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBooleanVectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgf: *mut *mut super::super::super::Foundation::BOOL, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToBooleanVectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgf), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBooleanWithDefault<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, fdefault: Param1) -> super::super::super::Foundation::BOOL {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBooleanWithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, fdefault: super::super::super::Foundation::BOOL) -> super::super::super::Foundation::BOOL;
}
::core::mem::transmute(PropVariantToBooleanWithDefault(::core::mem::transmute(propvarin), fdefault.into_param().abi()))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToBuffer(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToBuffer(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows::core::HRESULT;
}
PropVariantToBuffer(::core::mem::transmute(propvar), ::core::mem::transmute(pv), ::core::mem::transmute(cb)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToDouble(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<f64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToDouble(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pdblret: *mut f64) -> ::windows::core::HRESULT;
}
let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToDouble(::core::mem::transmute(propvarin), &mut result__).from_abi::<f64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToDoubleVector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut f64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToDoubleVector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut f64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToDoubleVector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToDoubleVectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut f64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToDoubleVectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut f64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToDoubleVectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToDoubleWithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, dbldefault: f64) -> f64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToDoubleWithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, dbldefault: f64) -> f64;
}
::core::mem::transmute(PropVariantToDoubleWithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(dbldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToFileTime(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pstfout: PSTIME_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::FILETIME> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToFileTime(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pstfout: PSTIME_FLAGS, pftout: *mut super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::FILETIME as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToFileTime(::core::mem::transmute(propvar), ::core::mem::transmute(pstfout), &mut result__).from_abi::<super::super::super::Foundation::FILETIME>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToFileTimeVector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgft: *mut super::super::super::Foundation::FILETIME, crgft: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToFileTimeVector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgft: *mut super::super::super::Foundation::FILETIME, crgft: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToFileTimeVector(::core::mem::transmute(propvar), ::core::mem::transmute(prgft), ::core::mem::transmute(crgft), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToFileTimeVectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgft: *mut *mut super::super::super::Foundation::FILETIME, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToFileTimeVectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgft: *mut *mut super::super::super::Foundation::FILETIME, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToFileTimeVectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgft), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToGUID(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<::windows::core::GUID> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToGUID(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pguid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT;
}
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToGUID(::core::mem::transmute(propvar), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt16(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<i16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt16(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, piret: *mut i16) -> ::windows::core::HRESULT;
}
let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToInt16(::core::mem::transmute(propvarin), &mut result__).from_abi::<i16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt16Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut i16, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt16Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut i16, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt16Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt16VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut i16, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt16VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut i16, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt16VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt16WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, idefault: i16) -> i16 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt16WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, idefault: i16) -> i16;
}
::core::mem::transmute(PropVariantToInt16WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(idefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt32(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt32(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, plret: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToInt32(::core::mem::transmute(propvarin), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt32Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut i32, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt32Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut i32, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt32Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt32VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut i32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt32VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut i32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt32VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt32WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ldefault: i32) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt32WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ldefault: i32) -> i32;
}
::core::mem::transmute(PropVariantToInt32WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(ldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt64(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<i64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt64(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pllret: *mut i64) -> ::windows::core::HRESULT;
}
let mut result__: <i64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToInt64(::core::mem::transmute(propvarin), &mut result__).from_abi::<i64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt64Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut i64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt64Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut i64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt64Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt64VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut i64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt64VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut i64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToInt64VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToInt64WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, lldefault: i64) -> i64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToInt64WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, lldefault: i64) -> i64;
}
::core::mem::transmute(PropVariantToInt64WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(lldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_Common"))]
#[inline]
pub unsafe fn PropVariantToStrRet(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::Common::STRRET> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToStrRet(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pstrret: *mut super::Common::STRRET) -> ::windows::core::HRESULT;
}
let mut result__: <super::Common::STRRET as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToStrRet(::core::mem::transmute(propvar), &mut result__).from_abi::<super::Common::STRRET>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToString(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, psz: super::super::super::Foundation::PWSTR, cch: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToString(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, psz: super::super::super::Foundation::PWSTR, cch: u32) -> ::windows::core::HRESULT;
}
PropVariantToString(::core::mem::transmute(propvar), ::core::mem::transmute(psz), ::core::mem::transmute(cch)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToStringAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToStringAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ppszout: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToStringAlloc(::core::mem::transmute(propvar), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToStringVector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgsz: *mut super::super::super::Foundation::PWSTR, crgsz: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToStringVector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgsz: *mut super::super::super::Foundation::PWSTR, crgsz: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToStringVector(::core::mem::transmute(propvar), ::core::mem::transmute(prgsz), ::core::mem::transmute(crgsz), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToStringVectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgsz: *mut *mut super::super::super::Foundation::PWSTR, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToStringVectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgsz: *mut *mut super::super::super::Foundation::PWSTR, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToStringVectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgsz), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToStringWithDefault<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pszdefault: Param1) -> super::super::super::Foundation::PWSTR {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToStringWithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pszdefault: super::super::super::Foundation::PWSTR) -> super::super::super::Foundation::PWSTR;
}
::core::mem::transmute(PropVariantToStringWithDefault(::core::mem::transmute(propvarin), pszdefault.into_param().abi()))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt16(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<u16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt16(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, puiret: *mut u16) -> ::windows::core::HRESULT;
}
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToUInt16(::core::mem::transmute(propvarin), &mut result__).from_abi::<u16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt16Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut u16, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt16Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut u16, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt16Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt16VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut u16, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt16VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut u16, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt16VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt16WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, uidefault: u16) -> u16 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt16WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, uidefault: u16) -> u16;
}
::core::mem::transmute(PropVariantToUInt16WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(uidefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt32(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<u32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt32(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pulret: *mut u32) -> ::windows::core::HRESULT;
}
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToUInt32(::core::mem::transmute(propvarin), &mut result__).from_abi::<u32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt32Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut u32, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt32Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut u32, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt32Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt32VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt32VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt32VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt32WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, uldefault: u32) -> u32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt32WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, uldefault: u32) -> u32;
}
::core::mem::transmute(PropVariantToUInt32WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(uldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt64(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<u64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt64(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pullret: *mut u64) -> ::windows::core::HRESULT;
}
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToUInt64(::core::mem::transmute(propvarin), &mut result__).from_abi::<u64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt64Vector(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, prgn: *mut u64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt64Vector(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, prgn: *mut u64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt64Vector(::core::mem::transmute(propvar), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt64VectorAlloc(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pprgn: *mut *mut u64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt64VectorAlloc(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pprgn: *mut *mut u64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
PropVariantToUInt64VectorAlloc(::core::mem::transmute(propvar), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToUInt64WithDefault(propvarin: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ulldefault: u64) -> u64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToUInt64WithDefault(propvarin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, ulldefault: u64) -> u64;
}
::core::mem::transmute(PropVariantToUInt64WithDefault(::core::mem::transmute(propvarin), ::core::mem::transmute(ulldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn PropVariantToVariant(ppropvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<super::super::super::System::Com::VARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToVariant(ppropvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, pvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
PropVariantToVariant(::core::mem::transmute(ppropvar), &mut result__).from_abi::<super::super::super::System::Com::VARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn PropVariantToWinRTPropertyValue<T: ::windows::core::Interface>(propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, result__: *mut ::core::option::Option<T>) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn PropVariantToWinRTPropertyValue(propvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
PropVariantToWinRTPropertyValue(::core::mem::transmute(propvar), &<T as ::windows::core::Interface>::IID, result__ as *mut _ as *mut _).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
pub const PropertySystem: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8967f85_58ae_4f46_9fb2_5d7904798f4b);
#[repr(C)]
#[derive(:: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy)]
pub struct SERIALIZEDPROPSTORAGE(pub u8);
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn SHAddDefaultPropertiesByExt<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPropertyStore>>(pszext: Param0, ppropstore: Param1) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHAddDefaultPropertiesByExt(pszext: super::super::super::Foundation::PWSTR, ppropstore: ::windows::core::RawPtr) -> ::windows::core::HRESULT;
}
SHAddDefaultPropertiesByExt(pszext.into_param().abi(), ppropstore.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn SHGetPropertyStoreForWindow<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HWND>>(hwnd: Param0, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHGetPropertyStoreForWindow(hwnd: super::super::super::Foundation::HWND, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
SHGetPropertyStoreForWindow(hwnd.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_UI_Shell_Common")]
#[inline]
pub unsafe fn SHGetPropertyStoreFromIDList(pidl: *const super::Common::ITEMIDLIST, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHGetPropertyStoreFromIDList(pidl: *const super::Common::ITEMIDLIST, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
SHGetPropertyStoreFromIDList(::core::mem::transmute(pidl), ::core::mem::transmute(flags), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
#[inline]
pub unsafe fn SHGetPropertyStoreFromParsingName<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::super::System::Com::IBindCtx>>(pszpath: Param0, pbc: Param1, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHGetPropertyStoreFromParsingName(pszpath: super::super::super::Foundation::PWSTR, pbc: ::windows::core::RawPtr, flags: GETPROPERTYSTOREFLAGS, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT;
}
SHGetPropertyStoreFromParsingName(pszpath.into_param().abi(), pbc.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
#[inline]
pub unsafe fn SHPropStgCreate<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertySetStorage>>(psstg: Param0, fmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, grfmode: u32, dwdisposition: u32, ppstg: *mut ::core::option::Option<super::super::super::System::Com::StructuredStorage::IPropertyStorage>, pucodepage: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHPropStgCreate(psstg: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, grfmode: u32, dwdisposition: u32, ppstg: *mut ::windows::core::RawPtr, pucodepage: *mut u32) -> ::windows::core::HRESULT;
}
SHPropStgCreate(psstg.into_param().abi(), ::core::mem::transmute(fmtid), ::core::mem::transmute(pclsid), ::core::mem::transmute(grfflags), ::core::mem::transmute(grfmode), ::core::mem::transmute(dwdisposition), ::core::mem::transmute(ppstg), ::core::mem::transmute(pucodepage)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn SHPropStgReadMultiple<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyStorage>>(pps: Param0, ucodepage: u32, cpspec: u32, rgpspec: *const super::super::super::System::Com::StructuredStorage::PROPSPEC) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHPropStgReadMultiple(pps: ::windows::core::RawPtr, ucodepage: u32, cpspec: u32, rgpspec: *const super::super::super::System::Com::StructuredStorage::PROPSPEC, rgvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
SHPropStgReadMultiple(pps.into_param().abi(), ::core::mem::transmute(ucodepage), ::core::mem::transmute(cpspec), ::core::mem::transmute(rgpspec), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn SHPropStgWriteMultiple<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::StructuredStorage::IPropertyStorage>>(pps: Param0, pucodepage: *mut u32, cpspec: u32, rgpspec: *const super::super::super::System::Com::StructuredStorage::PROPSPEC, rgvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT, propidnamefirst: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn SHPropStgWriteMultiple(pps: ::windows::core::RawPtr, pucodepage: *mut u32, cpspec: u32, rgpspec: *const super::super::super::System::Com::StructuredStorage::PROPSPEC, rgvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>, propidnamefirst: u32) -> ::windows::core::HRESULT;
}
SHPropStgWriteMultiple(pps.into_param().abi(), ::core::mem::transmute(pucodepage), ::core::mem::transmute(cpspec), ::core::mem::transmute(rgpspec), ::core::mem::transmute(rgvar), ::core::mem::transmute(propidnamefirst)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct SYNC_ENGINE_STATE_FLAGS(pub i32);
pub const SESF_NONE: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(0i32);
pub const SESF_SERVICE_QUOTA_NEARING_LIMIT: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(1i32);
pub const SESF_SERVICE_QUOTA_EXCEEDED_LIMIT: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(2i32);
pub const SESF_AUTHENTICATION_ERROR: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(4i32);
pub const SESF_PAUSED_DUE_TO_METERED_NETWORK: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(8i32);
pub const SESF_PAUSED_DUE_TO_DISK_SPACE_FULL: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(16i32);
pub const SESF_PAUSED_DUE_TO_CLIENT_POLICY: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(32i32);
pub const SESF_PAUSED_DUE_TO_SERVICE_POLICY: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(64i32);
pub const SESF_SERVICE_UNAVAILABLE: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(128i32);
pub const SESF_PAUSED_DUE_TO_USER_REQUEST: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(256i32);
pub const SESF_ALL_FLAGS: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(511i32);
impl ::core::convert::From<i32> for SYNC_ENGINE_STATE_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for SYNC_ENGINE_STATE_FLAGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct SYNC_TRANSFER_STATUS(pub i32);
pub const STS_NONE: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(0i32);
pub const STS_NEEDSUPLOAD: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(1i32);
pub const STS_NEEDSDOWNLOAD: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(2i32);
pub const STS_TRANSFERRING: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(4i32);
pub const STS_PAUSED: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(8i32);
pub const STS_HASERROR: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(16i32);
pub const STS_FETCHING_METADATA: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(32i32);
pub const STS_USER_REQUESTED_REFRESH: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(64i32);
pub const STS_HASWARNING: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(128i32);
pub const STS_EXCLUDED: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(256i32);
pub const STS_INCOMPLETE: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(512i32);
pub const STS_PLACEHOLDER_IFEMPTY: SYNC_TRANSFER_STATUS = SYNC_TRANSFER_STATUS(1024i32);
impl ::core::convert::From<i32> for SYNC_TRANSFER_STATUS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for SYNC_TRANSFER_STATUS {
type Abi = Self;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantCompare(var1: *const super::super::super::System::Com::VARIANT, var2: *const super::super::super::System::Com::VARIANT) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantCompare(var1: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, var2: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> i32;
}
::core::mem::transmute(VariantCompare(::core::mem::transmute(var1), ::core::mem::transmute(var2)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetBooleanElem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetBooleanElem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pfval: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetBooleanElem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetDoubleElem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<f64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetDoubleElem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut f64) -> ::windows::core::HRESULT;
}
let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetDoubleElem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<f64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetElementCount(varin: *const super::super::super::System::Com::VARIANT) -> u32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetElementCount(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>) -> u32;
}
::core::mem::transmute(VariantGetElementCount(::core::mem::transmute(varin)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetInt16Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<i16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetInt16Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut i16) -> ::windows::core::HRESULT;
}
let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetInt16Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<i16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetInt32Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetInt32Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetInt32Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetInt64Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<i64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetInt64Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut i64) -> ::windows::core::HRESULT;
}
let mut result__: <i64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetInt64Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<i64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetStringElem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetStringElem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, ppszval: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetStringElem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetUInt16Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<u16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetUInt16Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut u16) -> ::windows::core::HRESULT;
}
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetUInt16Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<u16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetUInt32Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<u32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetUInt32Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut u32) -> ::windows::core::HRESULT;
}
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetUInt32Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<u32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantGetUInt64Elem(var: *const super::super::super::System::Com::VARIANT, ielem: u32) -> ::windows::core::Result<u64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantGetUInt64Elem(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ielem: u32, pnval: *mut u64) -> ::windows::core::HRESULT;
}
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantGetUInt64Elem(::core::mem::transmute(var), ::core::mem::transmute(ielem), &mut result__).from_abi::<u64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToBoolean(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<super::super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToBoolean(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pfret: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToBoolean(::core::mem::transmute(varin), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToBooleanArray(var: *const super::super::super::System::Com::VARIANT, prgf: *mut super::super::super::Foundation::BOOL, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToBooleanArray(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgf: *mut super::super::super::Foundation::BOOL, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToBooleanArray(::core::mem::transmute(var), ::core::mem::transmute(prgf), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToBooleanArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgf: *mut *mut super::super::super::Foundation::BOOL, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToBooleanArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgf: *mut *mut super::super::super::Foundation::BOOL, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToBooleanArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgf), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToBooleanWithDefault<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(varin: *const super::super::super::System::Com::VARIANT, fdefault: Param1) -> super::super::super::Foundation::BOOL {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToBooleanWithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, fdefault: super::super::super::Foundation::BOOL) -> super::super::super::Foundation::BOOL;
}
::core::mem::transmute(VariantToBooleanWithDefault(::core::mem::transmute(varin), fdefault.into_param().abi()))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToBuffer(varin: *const super::super::super::System::Com::VARIANT, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToBuffer(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows::core::HRESULT;
}
VariantToBuffer(::core::mem::transmute(varin), ::core::mem::transmute(pv), ::core::mem::transmute(cb)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToDosDateTime(varin: *const super::super::super::System::Com::VARIANT, pwdate: *mut u16, pwtime: *mut u16) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToDosDateTime(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pwdate: *mut u16, pwtime: *mut u16) -> ::windows::core::HRESULT;
}
VariantToDosDateTime(::core::mem::transmute(varin), ::core::mem::transmute(pwdate), ::core::mem::transmute(pwtime)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToDouble(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<f64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToDouble(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pdblret: *mut f64) -> ::windows::core::HRESULT;
}
let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToDouble(::core::mem::transmute(varin), &mut result__).from_abi::<f64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToDoubleArray(var: *const super::super::super::System::Com::VARIANT, prgn: *mut f64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToDoubleArray(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut f64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToDoubleArray(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToDoubleArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut f64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToDoubleArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut f64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToDoubleArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToDoubleWithDefault(varin: *const super::super::super::System::Com::VARIANT, dbldefault: f64) -> f64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToDoubleWithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, dbldefault: f64) -> f64;
}
::core::mem::transmute(VariantToDoubleWithDefault(::core::mem::transmute(varin), ::core::mem::transmute(dbldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToFileTime(varin: *const super::super::super::System::Com::VARIANT, stfout: PSTIME_FLAGS) -> ::windows::core::Result<super::super::super::Foundation::FILETIME> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToFileTime(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, stfout: PSTIME_FLAGS, pftout: *mut super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::FILETIME as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToFileTime(::core::mem::transmute(varin), ::core::mem::transmute(stfout), &mut result__).from_abi::<super::super::super::Foundation::FILETIME>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToGUID(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<::windows::core::GUID> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToGUID(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pguid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT;
}
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToGUID(::core::mem::transmute(varin), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt16(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<i16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt16(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, piret: *mut i16) -> ::windows::core::HRESULT;
}
let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToInt16(::core::mem::transmute(varin), &mut result__).from_abi::<i16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt16Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut i16, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt16Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut i16, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt16Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt16ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut i16, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt16ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut i16, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt16ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt16WithDefault(varin: *const super::super::super::System::Com::VARIANT, idefault: i16) -> i16 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt16WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, idefault: i16) -> i16;
}
::core::mem::transmute(VariantToInt16WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(idefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt32(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<i32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt32(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, plret: *mut i32) -> ::windows::core::HRESULT;
}
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToInt32(::core::mem::transmute(varin), &mut result__).from_abi::<i32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt32Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut i32, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt32Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut i32, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt32Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt32ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut i32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt32ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut i32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt32ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt32WithDefault(varin: *const super::super::super::System::Com::VARIANT, ldefault: i32) -> i32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt32WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ldefault: i32) -> i32;
}
::core::mem::transmute(VariantToInt32WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(ldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt64(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<i64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt64(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pllret: *mut i64) -> ::windows::core::HRESULT;
}
let mut result__: <i64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToInt64(::core::mem::transmute(varin), &mut result__).from_abi::<i64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt64Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut i64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt64Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut i64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt64Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt64ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut i64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt64ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut i64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToInt64ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToInt64WithDefault(varin: *const super::super::super::System::Com::VARIANT, lldefault: i64) -> i64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToInt64WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, lldefault: i64) -> i64;
}
::core::mem::transmute(VariantToInt64WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(lldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToPropVariant(pvar: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToPropVariant(pvar: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToPropVariant(::core::mem::transmute(pvar), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))]
#[inline]
pub unsafe fn VariantToStrRet(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<super::Common::STRRET> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToStrRet(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pstrret: *mut super::Common::STRRET) -> ::windows::core::HRESULT;
}
let mut result__: <super::Common::STRRET as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToStrRet(::core::mem::transmute(varin), &mut result__).from_abi::<super::Common::STRRET>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToString(varin: *const super::super::super::System::Com::VARIANT, pszbuf: super::super::super::Foundation::PWSTR, cchbuf: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToString(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pszbuf: super::super::super::Foundation::PWSTR, cchbuf: u32) -> ::windows::core::HRESULT;
}
VariantToString(::core::mem::transmute(varin), ::core::mem::transmute(pszbuf), ::core::mem::transmute(cchbuf)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToStringAlloc(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToStringAlloc(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ppszbuf: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToStringAlloc(::core::mem::transmute(varin), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToStringArray(var: *const super::super::super::System::Com::VARIANT, prgsz: *mut super::super::super::Foundation::PWSTR, crgsz: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToStringArray(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgsz: *mut super::super::super::Foundation::PWSTR, crgsz: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToStringArray(::core::mem::transmute(var), ::core::mem::transmute(prgsz), ::core::mem::transmute(crgsz), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToStringArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgsz: *mut *mut super::super::super::Foundation::PWSTR, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToStringArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgsz: *mut *mut super::super::super::Foundation::PWSTR, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToStringArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgsz), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToStringWithDefault<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(varin: *const super::super::super::System::Com::VARIANT, pszdefault: Param1) -> super::super::super::Foundation::PWSTR {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToStringWithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pszdefault: super::super::super::Foundation::PWSTR) -> super::super::super::Foundation::PWSTR;
}
::core::mem::transmute(VariantToStringWithDefault(::core::mem::transmute(varin), pszdefault.into_param().abi()))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt16(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<u16> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt16(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, puiret: *mut u16) -> ::windows::core::HRESULT;
}
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToUInt16(::core::mem::transmute(varin), &mut result__).from_abi::<u16>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt16Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut u16, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt16Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut u16, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt16Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt16ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut u16, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt16ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut u16, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt16ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt16WithDefault(varin: *const super::super::super::System::Com::VARIANT, uidefault: u16) -> u16 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt16WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, uidefault: u16) -> u16;
}
::core::mem::transmute(VariantToUInt16WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(uidefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt32(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<u32> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt32(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pulret: *mut u32) -> ::windows::core::HRESULT;
}
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToUInt32(::core::mem::transmute(varin), &mut result__).from_abi::<u32>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt32Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut u32, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt32Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut u32, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt32Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt32ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt32ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt32ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt32WithDefault(varin: *const super::super::super::System::Com::VARIANT, uldefault: u32) -> u32 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt32WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, uldefault: u32) -> u32;
}
::core::mem::transmute(VariantToUInt32WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(uldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt64(varin: *const super::super::super::System::Com::VARIANT) -> ::windows::core::Result<u64> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt64(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pullret: *mut u64) -> ::windows::core::HRESULT;
}
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
VariantToUInt64(::core::mem::transmute(varin), &mut result__).from_abi::<u64>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt64Array(var: *const super::super::super::System::Com::VARIANT, prgn: *mut u64, crgn: u32, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt64Array(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, prgn: *mut u64, crgn: u32, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt64Array(::core::mem::transmute(var), ::core::mem::transmute(prgn), ::core::mem::transmute(crgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt64ArrayAlloc(var: *const super::super::super::System::Com::VARIANT, pprgn: *mut *mut u64, pcelem: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt64ArrayAlloc(var: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pprgn: *mut *mut u64, pcelem: *mut u32) -> ::windows::core::HRESULT;
}
VariantToUInt64ArrayAlloc(::core::mem::transmute(var), ::core::mem::transmute(pprgn), ::core::mem::transmute(pcelem)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
#[inline]
pub unsafe fn VariantToUInt64WithDefault(varin: *const super::super::super::System::Com::VARIANT, ulldefault: u64) -> u64 {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn VariantToUInt64WithDefault(varin: *const ::core::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, ulldefault: u64) -> u64;
}
::core::mem::transmute(VariantToUInt64WithDefault(::core::mem::transmute(varin), ::core::mem::transmute(ulldefault)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
#[inline]
pub unsafe fn WinRTPropertyValueToPropVariant<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(punkpropertyvalue: Param0) -> ::windows::core::Result<super::super::super::System::Com::StructuredStorage::PROPVARIANT> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn WinRTPropertyValueToPropVariant(punkpropertyvalue: ::windows::core::RawPtr, ppropvar: *mut ::core::mem::ManuallyDrop<super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
WinRTPropertyValueToPropVariant(punkpropertyvalue.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct _PERSIST_SPROPSTORE_FLAGS(pub i32);
pub const FPSPS_DEFAULT: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(0i32);
pub const FPSPS_READONLY: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(1i32);
pub const FPSPS_TREAT_NEW_VALUES_AS_DIRTY: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(2i32);
impl ::core::convert::From<i32> for _PERSIST_SPROPSTORE_FLAGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for _PERSIST_SPROPSTORE_FLAGS {
type Abi = Self;
}
|
/*
Copyright (c) 2015, 2016 Saurav Sachidanand
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
//! Parabolic orbits
use std;
use orbit;
/**
Computes the true anomaly and radius vector of a body in a parabolic
orbit at a given time
# Returns
`(tru_anom, rad_vec)`
* `true_anom`: True anomaly of the body at time `t` *| in radians*
* `rad_vec` : Radius vector of the body at time `t` *| in AU*
# Arguments
* `t`: Time of interest, in Julian (Ephemeris) day
* `T`: Time of passage through the perihelion, in Julian (Ephemeris) day
* `q`: Perihelion distance *| in AU*
**/
pub fn true_anom_and_rad_vec(t: f64, T: f64, q: f64) -> (f64, f64) {
let W = 0.03649116245 * (t - T) / q.powf(1.5);
let G = W / 2.0;
let Y = (G + (G*G + 1.0).sqrt()).cbrt();
let s = Y - 1.0/Y;
let v = 2.0 * s.atan();
let r = q * (1.0 + s*s);
(v, r)
}
/**
Computes the time of passage of a body through a node of a parabolic
orbit and it's radius vector at that time
# Returns
`(time_of_pass, rad_vec)`
* `time_of_pass`: Time of passage through the node, in Julian
(Ephemeris) day
* `rad_vec` : Radius vector of the body at the time of passage
*| in AU*
# Arguments
* `w` : Argument of the perihelion *| in radians*
* `q` : Perihelion distance *| in AU*
* `T` : Time of passage in perihelion, in Julian (Ephemeris) day
* `node`: `Ascend` or `Descend` node
**/
#[inline]
pub fn passage_through_node (
w : f64,
q : f64,
T : f64,
node : &orbit::Node
) -> (f64, f64) {
match *node {
orbit::Node::Ascend => pass_through_node(-w, q, T),
orbit::Node::Descend => pass_through_node(std::f64::consts::PI - w, q, T)
}
}
fn pass_through_node(v: f64, q: f64, T: f64) -> (f64, f64) {
let s = (v / 2.0).tan();
let T_node = T + q.powf(1.5) * (s * (s*s + 3.0)) * 27.403895;
let rad_vec = q * (1.0 + s*s);
(T_node, rad_vec)
}
|
#[macro_use]
extern crate log;
extern crate num;
extern crate simple_logging;
extern crate image;
extern crate nalgebra as na;
extern crate num_traits;
use log::LogLevelFilter;
use num_traits::Float;
//use num_traits::identities::Zero;
mod graphics;
use graphics::GraphicsContext;
mod shape;
use shape::Shape;
mod tf;
//use tf::Pose;
fn init_logging() {
simple_logging::log_to_stderr(LogLevelFilter::Info).expect("Failed to initalize logging!");
info!("Logging initalized!");
}
fn main() {
init_logging();
// Image
let image_file = "test.png";
let scale = 20.0;
let img_width = (32.0 * scale).round() as u32;
let img_height = (32.0 * scale).round() as u32;
let aspect = img_width as f32 / img_height as f32;
info!("Filling in background");
// Projection
let proj = na::Perspective3::new(aspect, 3.14 / 4.0, 0.1, 9.0);
// Camera
let origin_z = -8.0;
let origin = tf::tf_rpy_pos(2.8, 2.8, origin_z, 0.0, 0.0, 0.0);
let tf_axes = tf::tf_pos_rpy(-3.0, -3.0, origin_z, 0.0, 0.0, 0.0);
let sphere = shape::Sphere {
pose: origin.clone(),
radius: 1.0,
};
let imgbuf = image::RgbImage::new(img_width, img_height);
let mut context = GraphicsContext {
tf_root: origin.clone(),
projection: proj,
img_width: img_width,
img_height: img_height,
imgbuf: imgbuf,
};
let imgbuf = image::RgbImage::from_fn(img_width, img_height, |x, y| {
let ray = context.unproject_point(na::Point2::new(x, y));
let val = match sphere.intersects(&ray) {
true => 255,
false => 0,
};
image::Rgb([val, val, val])
});
context.imgbuf = imgbuf;
info!("Drawing axes");
graphics::draw_axes(&tf_axes, 0.325, &mut context);
info!("Drawing cube");
graphics::draw_cube(&origin, 0.4, image::Rgb([255, 255, 255]), &mut context);
context.save(image_file);
}
|
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use super::TypeDeclarator;
use crate::lexer::preprocessor::context::PreprocContext;
use crate::lexer::{Lexer, LocToken, Token};
use crate::parser::expression::Operator;
use crate::parser::expression::{ExprNode, ExpressionParser};
use crate::parser::initializer::Initializer;
#[derive(Clone, Debug, PartialEq)]
pub struct BitFieldDeclarator {
pub typ: TypeDeclarator,
pub size: ExprNode,
}
pub struct BitFieldDeclaratorParser<'a, 'b, PC: PreprocContext> {
lexer: &'b mut Lexer<'a, PC>,
}
impl<'a, 'b, PC: PreprocContext> BitFieldDeclaratorParser<'a, 'b, PC> {
pub(super) fn new(lexer: &'b mut Lexer<'a, PC>) -> Self {
Self { lexer }
}
pub(super) fn parse(
self,
tok: Option<LocToken>,
typ: TypeDeclarator,
) -> (Option<LocToken>, Option<BitFieldDeclarator>) {
let mut ep = ExpressionParser::new(self.lexer, Token::Comma);
let (tok, size) = ep.parse(tok);
let size = if let Some(size) = size {
size
} else {
unreachable!("Invalid bitfield size");
};
let (size, init) = match size {
ExprNode::BinaryOp(operation) => {
if operation.op == Operator::Assign {
(operation.arg1, Some(Initializer::Equal(operation.arg2)))
} else {
(ExprNode::BinaryOp(operation), None)
}
}
ExprNode::InitExpr(init) => (init.base, Some(Initializer::Brace(init.list))),
_ => (size, None),
};
let mut typ = typ;
typ.init = init;
(tok, Some(BitFieldDeclarator { typ, size }))
}
}
|
fn main() {
let age :i32 = "22".parse().expect("not found");
println!("Hello, world! {}", age);
}
|
//! Interfacing the on-board LSM303DLHC (accelerometer + compass)
#![deny(unsafe_code)]
#![deny(warnings)]
#![no_std]
#![no_main]
extern crate panic_semihosting;
use cortex_m_rt::entry;
use cortex_m_semihosting::hprintln;
use f3::{
hal::{i2c::I2c, delay::Delay, prelude::*, stm32f30x},
Lsm303dlhc,
};
#[entry]
fn main() -> ! {
let p = stm32f30x::Peripherals::take().unwrap();
let cp = cortex_m::Peripherals::take().unwrap();
let mut flash = p.FLASH.constrain();
let mut rcc = p.RCC.constrain();
// TRY the other clock configuration
let clocks = rcc.cfgr.freeze(&mut flash.acr);
// let clocks = rcc.cfgr.sysclk(64.mhz()).pclk1(32.mhz()).freeze(&mut flash.acr);
let mut delay = Delay::new(cp.SYST, clocks);
// The `Lsm303dlhc` abstraction exposed by the `f3` crate requires a specific pin configuration
// to be used and won't accept any configuration other than the one used here. Trying to use a
// different pin configuration will result in a compiler error.
let mut gpiob = p.GPIOB.split(&mut rcc.ahb);
let scl = gpiob.pb6.into_af4(&mut gpiob.moder, &mut gpiob.afrl);
let sda = gpiob.pb7.into_af4(&mut gpiob.moder, &mut gpiob.afrl);
let i2c = I2c::i2c1(p.I2C1, (scl, sda), 400.khz(), clocks, &mut rcc.apb1);
let mut lsm303dlhc = Lsm303dlhc::new(i2c).unwrap();
let mut _accel = lsm303dlhc.accel().unwrap();
let mut _mag = lsm303dlhc.mag().unwrap();
let mut _temp = lsm303dlhc.temp().unwrap();
loop {
_accel = lsm303dlhc.accel().unwrap();
_mag = lsm303dlhc.mag().unwrap();
_temp = lsm303dlhc.temp().unwrap();
hprintln!("Mag x: {}, y: {}, z: {}", _mag.x, _mag.y, _mag.z).unwrap();
delay.delay_ms(100_u8);
}
}
|
//! Actors registry
//!
//! An Actor can register itself as a service. A Service can be defined as an
//! `ArbiterService`, which is unique per arbiter, or a `SystemService`, which
//! is unique per system.
use std::{
any::{Any, TypeId},
cell::RefCell,
collections::HashMap,
default::Default,
rc::Rc,
};
use actix_rt::{ArbiterHandle, System};
use once_cell::sync::Lazy;
use parking_lot::Mutex;
use crate::{
actor::{Actor, Supervised},
address::Addr,
context::Context,
supervisor::Supervisor,
};
type AnyMap = HashMap<TypeId, Box<dyn Any>>;
/// Actors registry
///
/// An Actor can register itself as a service. A Service can be defined as an
/// `ArbiterService`, which is unique per arbiter, or a `SystemService`, which
/// is unique per system.
///
/// If an arbiter service is used outside of a running arbiter, it panics.
///
/// # Examples
///
/// ```
/// use actix::prelude::*;
///
/// #[derive(Message)]
/// #[rtype(result = "()")]
/// struct Ping;
///
/// #[derive(Default)]
/// struct MyActor1;
///
/// impl Actor for MyActor1 {
/// type Context = Context<Self>;
/// }
/// impl actix::Supervised for MyActor1 {}
///
/// impl ArbiterService for MyActor1 {
/// fn service_started(&mut self, ctx: &mut Context<Self>) {
/// println!("Service started");
/// }
/// }
///
/// impl Handler<Ping> for MyActor1 {
/// type Result = ();
///
/// fn handle(&mut self, _: Ping, ctx: &mut Context<Self>) {
/// println!("ping");
/// # System::current().stop();
/// }
/// }
///
/// struct MyActor2;
///
/// impl Actor for MyActor2 {
/// type Context = Context<Self>;
///
/// fn started(&mut self, _: &mut Context<Self>) {
/// // get MyActor1 address from the registry
/// let act = MyActor1::from_registry();
/// act.do_send(Ping);
/// }
/// }
///
/// #[actix::main]
/// async fn main() {
/// // Start MyActor2 in new Arbiter
/// Arbiter::new().spawn_fn(|| {
/// MyActor2.start();
/// });
/// # System::current().stop();
/// }
/// ```
#[derive(Clone)]
pub struct Registry {
registry: Rc<RefCell<AnyMap>>,
}
thread_local! {
static AREG: Registry = {
Registry {
registry: Rc::new(RefCell::new(AnyMap::new()))
}
};
}
/// Trait defines arbiter's service.
#[allow(unused_variables)]
pub trait ArbiterService: Actor<Context = Context<Self>> + Supervised + Default {
/// Construct and start arbiter service
fn start_service() -> Addr<Self> {
Supervisor::start(|ctx| {
let mut act = Self::default();
act.service_started(ctx);
act
})
}
/// Method is called during service initialization.
fn service_started(&mut self, ctx: &mut Context<Self>) {}
/// Get actor's address from arbiter registry
fn from_registry() -> Addr<Self> {
AREG.with(|reg| reg.get())
}
}
impl Registry {
/// Query registry for specific actor. Returns address of the actor.
/// If actor is not registered, starts new actor and
/// return address of newly created actor.
pub fn get<A: ArbiterService + Actor<Context = Context<A>>>(&self) -> Addr<A> {
let id = TypeId::of::<A>();
if let Some(addr) = self.registry.borrow().get(&id) {
if let Some(addr) = addr.downcast_ref::<Addr<A>>() {
return addr.clone();
}
}
let addr: Addr<A> = A::start_service();
self.registry
.borrow_mut()
.insert(id, Box::new(addr.clone()));
addr
}
/// Check if actor is in registry, if so, return its address
pub fn query<A: ArbiterService + Actor<Context = Context<A>>>(&self) -> Option<Addr<A>> {
let id = TypeId::of::<A>();
if let Some(addr) = self.registry.borrow().get(&id) {
if let Some(addr) = addr.downcast_ref::<Addr<A>>() {
return Some(addr.clone());
}
}
None
}
/// Add new actor to the registry by address, panic if actor is already running
pub fn set<A: ArbiterService + Actor<Context = Context<A>>>(addr: Addr<A>) {
AREG.with(|reg| {
let id = TypeId::of::<A>();
if let Some(addr) = reg.registry.borrow().get(&id) {
if addr.downcast_ref::<Addr<A>>().is_some() {
panic!("Actor already started");
}
}
reg.registry.borrow_mut().insert(id, Box::new(addr));
})
}
}
/// System wide actors registry
///
/// System registry serves same purpose as [Registry](struct.Registry.html),
/// except it is shared across all arbiters.
///
/// # Examples
///
/// ```
/// use actix::prelude::*;
///
/// #[derive(Message)]
/// #[rtype(result = "()")]
/// struct Ping;
///
/// #[derive(Default)]
/// struct MyActor1;
///
/// impl Actor for MyActor1 {
/// type Context = Context<Self>;
/// }
/// impl actix::Supervised for MyActor1 {}
///
/// impl SystemService for MyActor1 {
/// fn service_started(&mut self, ctx: &mut Context<Self>) {
/// println!("Service started");
/// }
/// }
///
/// impl Handler<Ping> for MyActor1 {
/// type Result = ();
///
/// fn handle(&mut self, _: Ping, ctx: &mut Context<Self>) {
/// println!("ping");
/// # System::current().stop();
/// }
/// }
///
/// struct MyActor2;
///
/// impl Actor for MyActor2 {
/// type Context = Context<Self>;
///
/// fn started(&mut self, _: &mut Context<Self>) {
/// let act = MyActor1::from_registry();
/// act.do_send(Ping);
/// }
/// }
///
/// #[actix::main]
/// async fn main() {
/// // Start MyActor2
/// let addr = MyActor2.start();
/// }
/// ```
#[derive(Debug)]
pub struct SystemRegistry {
system: ArbiterHandle,
registry: HashMap<TypeId, Box<dyn Any + Send>>,
}
static SREG: Lazy<Mutex<HashMap<usize, SystemRegistry>>> = Lazy::new(|| Mutex::new(HashMap::new()));
/// Trait defines system's service.
#[allow(unused_variables)]
pub trait SystemService: Actor<Context = Context<Self>> + Supervised + Default {
/// Construct and start system service
fn start_service(wrk: &ArbiterHandle) -> Addr<Self> {
Supervisor::start_in_arbiter(wrk, |ctx| {
let mut act = Self::default();
act.service_started(ctx);
act
})
}
/// Method is called during service initialization.
fn service_started(&mut self, ctx: &mut Context<Self>) {}
/// Get actor's address from system registry
fn from_registry() -> Addr<Self> {
let sys = System::current();
let mut sreg = SREG.lock();
let reg = sreg
.entry(sys.id())
.or_insert_with(|| SystemRegistry::new(sys.arbiter().clone()));
if let Some(addr) = reg.registry.get(&TypeId::of::<Self>()) {
if let Some(addr) = addr.downcast_ref::<Addr<Self>>() {
return addr.clone();
}
}
let addr = Self::start_service(System::current().arbiter());
reg.registry
.insert(TypeId::of::<Self>(), Box::new(addr.clone()));
addr
}
}
impl SystemRegistry {
pub(crate) fn new(system: ArbiterHandle) -> Self {
Self {
system,
registry: HashMap::default(),
}
}
/// Return address of the service. If service actor is not running
/// it get started in the system.
pub fn get<A: SystemService + Actor<Context = Context<A>>>(&mut self) -> Addr<A> {
if let Some(addr) = self.registry.get(&TypeId::of::<A>()) {
match addr.downcast_ref::<Addr<A>>() {
Some(addr) => return addr.clone(),
None => panic!("Got unknown value: {:?}", addr),
}
}
let addr = A::start_service(&self.system);
self.registry
.insert(TypeId::of::<A>(), Box::new(addr.clone()));
addr
}
/// Check if actor is in registry, if so, return its address
pub fn query<A: SystemService + Actor<Context = Context<A>>>(&self) -> Option<Addr<A>> {
if let Some(addr) = self.registry.get(&TypeId::of::<A>()) {
match addr.downcast_ref::<Addr<A>>() {
Some(addr) => return Some(addr.clone()),
None => return None,
}
}
None
}
/// Add new actor to the registry by address, panic if actor is already running
pub fn set<A: SystemService + Actor<Context = Context<A>>>(addr: Addr<A>) {
let sys = System::current();
let mut sreg = SREG.lock();
let reg = sreg
.entry(sys.id())
.or_insert_with(|| SystemRegistry::new(sys.arbiter().clone()));
if let Some(addr) = reg.registry.get(&TypeId::of::<A>()) {
if addr.downcast_ref::<Addr<A>>().is_some() {
panic!("Actor already started");
}
}
reg.registry.insert(TypeId::of::<A>(), Box::new(addr));
}
}
|
use std::{
convert::TryFrom,
ops::{BitAnd, Mul, Sub},
};
use serde::{Deserialize, Serialize};
use crow_ecs::{Entity, SparseStorage, Storage};
use crow_anim::{AnimationHandle, AnimationState, Sprite};
#[derive(Default)]
pub struct Components {
pub count: usize,
pub deleted: Vec<Entity>,
pub positions: Storage<Position>,
pub sprites: Storage<Sprite>,
pub animations: Storage<AnimationState>,
pub previous_positions: Storage<Position>,
pub velocities: Storage<Velocity>,
pub colliders: Storage<Collider>,
pub grounded: Storage<Grounded>,
pub wall_collisions: Storage<WallCollision>,
pub gravity: Storage<Gravity>,
pub ignore_bridges: SparseStorage<IgnoreBridges>,
pub player_state: SparseStorage<PlayerState>,
pub player_animations: SparseStorage<PlayerAnimations>,
pub depths: Storage<Depth>,
pub mirrored: SparseStorage<Mirrored>,
pub cameras: SparseStorage<Camera>,
}
impl Components {
pub fn new() -> Self {
Components::default()
}
pub fn new_entity(&mut self) -> Entity {
if let Some(e) = self.deleted.pop() {
e
} else {
let e = Entity(self.count);
self.count += 1;
e
}
}
pub fn delete_entity(&mut self, e: Entity) {
self.deleted.push(e);
self.positions.remove(e);
self.sprites.remove(e);
self.animations.remove(e);
self.previous_positions.remove(e);
self.velocities.remove(e);
self.colliders.remove(e);
self.grounded.remove(e);
self.wall_collisions.remove(e);
self.gravity.remove(e);
self.ignore_bridges.remove(e);
self.player_state.remove(e);
self.player_animations.remove(e);
self.depths.remove(e);
self.mirrored.remove(e);
self.cameras.remove(e);
}
}
#[derive(Debug, Default, Clone, Copy, Deserialize, Serialize)]
pub struct Position {
pub x: f32,
pub y: f32,
}
impl From<Position> for (i32, i32) {
fn from(position: Position) -> Self {
(position.x.round() as i32, position.y.round() as i32)
}
}
#[derive(Debug, Clone, Copy, Default)]
pub struct Velocity {
pub x: f32,
pub y: f32,
}
impl Mul<f32> for Velocity {
type Output = Self;
fn mul(self, rhs: f32) -> Self {
Velocity {
x: self.x * rhs,
y: self.y * rhs,
}
}
}
impl Sub for Velocity {
type Output = Velocity;
fn sub(self, other: Self) -> Velocity {
Velocity {
x: self.x - other.x,
y: self.y - other.y,
}
}
}
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum Depth {
Background,
Bridges,
Grass,
Player,
Tiles,
Editor,
Particles,
}
impl From<Depth> for f32 {
fn from(depth: Depth) -> f32 {
match depth {
Depth::Editor => 0.0,
Depth::Particles => 0.3,
Depth::Grass => 0.5,
Depth::Tiles => 0.5,
Depth::Player => 0.6,
Depth::Bridges => 0.7,
Depth::Background => 0.9,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PlayerState {
Grounded,
Airborne,
Dying,
Dead,
}
pub struct PlayerAnimations {
pub idle: AnimationHandle,
pub running: AnimationHandle,
pub run_into_obstacle: AnimationHandle,
/// run once after jumping -> falling,
pub jumping: AnimationHandle,
/// run once during a jump/fall -> falling,
pub start_falling: AnimationHandle,
pub falling: AnimationHandle,
}
#[derive(Debug, Clone, Copy)]
pub struct Collider {
pub w: f32,
pub h: f32,
pub ty: ColliderType,
}
impl Collider {
#[inline]
pub fn left_border(&self, pos: Position) -> f32 {
pos.x
}
#[inline]
pub fn right_border(&self, pos: Position) -> f32 {
pos.x + self.w
}
#[inline]
pub fn lower_border(&self, pos: Position) -> f32 {
pos.y
}
#[inline]
pub fn upper_border(&self, pos: Position) -> f32 {
pos.y + self.h
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ColliderType {
Environment,
Player,
Bridge,
PlayerDamage,
Camera,
CameraRestriction,
}
#[derive(Debug, Clone, Copy)]
pub struct Collision(pub Entity, pub Entity);
#[derive(Debug, Default)]
pub struct Collisions {
pub fixed: Vec<Collision>,
pub bridge: Vec<Collision>,
pub player_damage: Vec<Collision>,
}
impl Collisions {
pub fn clear(&mut self) {
self.fixed.clear();
self.bridge.clear();
self.player_damage.clear();
}
}
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum CollisionDirection {
None = 0b0000,
LeftAbove = 0b1001,
Above = 0b0001,
RightAbove = 0b0011,
Right = 0b0010,
RightBelow = 0b0110,
Below = 0b0100,
LeftBelow = 0b1100,
Left = 0b1000,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct InvalidBitPattern;
impl TryFrom<u8> for CollisionDirection {
type Error = InvalidBitPattern;
fn try_from(value: u8) -> Result<Self, Self::Error> {
match value {
0b0000 => Ok(CollisionDirection::None),
0b1001 => Ok(CollisionDirection::LeftAbove),
0b0001 => Ok(CollisionDirection::Above),
0b0011 => Ok(CollisionDirection::RightAbove),
0b0010 => Ok(CollisionDirection::Right),
0b0110 => Ok(CollisionDirection::RightBelow),
0b0100 => Ok(CollisionDirection::Below),
0b1100 => Ok(CollisionDirection::LeftBelow),
0b1000 => Ok(CollisionDirection::Left),
_ => Err(InvalidBitPattern),
}
}
}
impl BitAnd for CollisionDirection {
type Output = Self;
fn bitand(self, rhs: Self) -> Self::Output {
Self::try_from(self as u8 & rhs as u8).unwrap()
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Grounded;
#[derive(Debug, Clone, Copy)]
pub struct Gravity;
#[derive(Debug, Clone, Copy)]
pub struct IgnoreBridges;
/// Used during `draw::scene` to horizontally flip sprites based on the collider of the given entity.
#[derive(Debug, Clone, Copy)]
pub struct Mirrored;
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub struct WallCollision;
#[derive(Default, Debug, Clone)]
pub struct Camera;
|
//
// See Rust Language Specific Instructions
// below normal exercise description.
//
pub fn encode(mut num: i32) -> String {
if num < 0 {
return "won't compile".to_string(); // Returns "won't compile" string
}
else {
let mut result = String::new(); // For the result
let places: [&str; 4] = ["hundred","thousand","million","billion"]; // For the 100s & 1000(000(000))s
let tens: [&str; 10] = ["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"]; // For the teens (20,30..90)
let two_dig: [&str; 10] = ["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"]; // For the teens (10-19)
let ones: [&str; 10] = ["zero","one","two","three","four","five","six","seven","eight","nine"]; // For the ones place
if num == 0 {
result.push(ones[0].to_string());
}
else {
let mut tmp = String::new();
let mut place = 1;
while num != 0 {
let z: i32 = num % 10; // Ones places
let y: i32 = ((num % 100) - z) / 10; // Tens place
let x: i32 = ((num % 1000) - y - z) / 100; // Hundreds place
if x != 0 {
tmp.push(ones[x].to_string()).push(" ".to_string()).push(places[0].to_string());
}
if y == 0 {
if z != 0 {
}
}
else if y == 1 {
}
else {
if z == 0 {
} else {
}
}
num /= 1000;
if num != 0 {
place += 1;
}
}
}
return result; // Return overall result in string form
}
}
|
trait T {
}
struct S0 {
}
struct S1 {
}
struct S2 {
}
impl T for S0 {
}
impl T for S1 {
}
impl T for S2 {
}
fn a(_a: Vec<impl T>) {
}
fn main() {
a(vec![S0{}]);
a(vec![S1{}]);
a(vec![S2{}]);
a(vec![S0{}, S1{}, S2{}]);
}
|
// 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_exception::Span;
use crate::binder::ColumnBinding;
use crate::binder::Visibility;
use crate::plans::AndExpr;
use crate::plans::BoundColumnRef;
use crate::plans::CastExpr;
use crate::plans::ComparisonExpr;
use crate::plans::FunctionCall;
use crate::plans::NotExpr;
use crate::plans::OrExpr;
use crate::plans::ScalarExpr;
use crate::BindContext;
/// Check validity of scalar expression in a grouping context.
/// The matched grouping item will be replaced with a BoundColumnRef
/// to corresponding grouping item column.
pub struct GroupingChecker<'a> {
bind_context: &'a BindContext,
}
impl<'a> GroupingChecker<'a> {
pub fn new(bind_context: &'a BindContext) -> Self {
Self { bind_context }
}
pub fn resolve(&mut self, scalar: &ScalarExpr, span: Span) -> Result<ScalarExpr> {
if let Some(index) = self.bind_context.aggregate_info.group_items_map.get(scalar) {
let column = &self.bind_context.aggregate_info.group_items[*index];
let mut column_binding = if let ScalarExpr::BoundColumnRef(column_ref) = &column.scalar
{
column_ref.column.clone()
} else {
ColumnBinding {
database_name: None,
table_name: None,
column_name: "group_item".to_string(),
index: column.index,
data_type: Box::new(column.scalar.data_type()?),
visibility: Visibility::Visible,
}
};
if let Some(grouping_id) = &self.bind_context.aggregate_info.grouping_id_column {
if grouping_id.index != column_binding.index {
column_binding.data_type = Box::new(column_binding.data_type.wrap_nullable());
}
}
return Ok(BoundColumnRef {
span: scalar.span(),
column: column_binding,
}
.into());
}
match scalar {
ScalarExpr::BoundColumnRef(column) => {
// If this is a group item, then it should have been replaced with `group_items_map`
Err(ErrorCode::SemanticError(format!(
"column \"{}\" must appear in the GROUP BY clause or be used in an aggregate function",
&column.column.column_name
)).set_span(span))
}
ScalarExpr::BoundInternalColumnRef(column) => {
// If this is a group item, then it should have been replaced with `group_items_map`
Err(ErrorCode::SemanticError(format!(
"column \"{}\" must appear in the GROUP BY clause or be used in an aggregate function",
&column.column.internal_column.column_name()
)).set_span(span))
}
ScalarExpr::ConstantExpr(_) => Ok(scalar.clone()),
ScalarExpr::AndExpr(scalar) => Ok(AndExpr {
left: Box::new(self.resolve(&scalar.left, span)?),
right: Box::new(self.resolve(&scalar.right, span)?),
}
.into()),
ScalarExpr::OrExpr(scalar) => Ok(OrExpr {
left: Box::new(self.resolve(&scalar.left, span)?),
right: Box::new(self.resolve(&scalar.right, span)?),
}
.into()),
ScalarExpr::NotExpr(scalar) => Ok(NotExpr {
argument: Box::new(self.resolve(&scalar.argument, span)?),
}
.into()),
ScalarExpr::ComparisonExpr(scalar) => Ok(ComparisonExpr {
op: scalar.op.clone(),
left: Box::new(self.resolve(&scalar.left, span)?),
right: Box::new(self.resolve(&scalar.right, span)?),
}
.into()),
ScalarExpr::FunctionCall(func) => {
let args = func
.arguments
.iter()
.map(|arg| self.resolve(arg, span))
.collect::<Result<Vec<ScalarExpr>>>()?;
Ok(FunctionCall {
span: func.span,
params: func.params.clone(),
arguments: args,
func_name: func.func_name.clone(),
}
.into())
}
ScalarExpr::CastExpr(cast) => Ok(CastExpr {
span: cast.span,
is_try: cast.is_try,
argument: Box::new(self.resolve(&cast.argument, span)?),
target_type: cast.target_type.clone(),
}
.into()),
ScalarExpr::SubqueryExpr(_) => {
// TODO(leiysky): check subquery in the future
Ok(scalar.clone())
}
ScalarExpr::WindowFunction(win) => {
if let Some(column) = self
.bind_context
.aggregate_info
.aggregate_functions_map
.get(&win.agg_func.display_name)
{
let agg_func = &self.bind_context.aggregate_info.aggregate_functions[*column];
let column_binding = ColumnBinding {
database_name: None,
table_name: None,
column_name: win.agg_func.display_name.clone(),
index: agg_func.index,
data_type: Box::new(agg_func.scalar.data_type()?),
visibility: Visibility::Visible,
};
return Ok(BoundColumnRef {
span: None,
column: column_binding,
}
.into());
}
Err(ErrorCode::Internal("Invalid aggregate function"))
}
ScalarExpr::AggregateFunction(agg) => {
if let Some(column) = self
.bind_context
.aggregate_info
.aggregate_functions_map
.get(&agg.display_name)
{
let agg_func = &self.bind_context.aggregate_info.aggregate_functions[*column];
let column_binding = ColumnBinding {
database_name: None,
table_name: None,
column_name: agg.display_name.clone(),
index: agg_func.index,
data_type: Box::new(agg_func.scalar.data_type()?),
visibility: Visibility::Visible,
};
return Ok(BoundColumnRef {
span: None,
column: column_binding,
}
.into());
}
Err(ErrorCode::Internal("Invalid aggregate function"))
}
}
}
}
|
//! # Embedded Graphics Web Simulator
//!
//! 
//!
//! The Web Simulator allows you to use a browser to test embedded-graphics code and run graphics.
//! There is no need to install SDL and its development libraries for running the project.
//!
//! # Setup
//! This library is intended to be used in Rust + Webassembly projects.
//! Check the examples which illustrate how to use the library.
//! Look at the [examples](https://github.com/embedded-graphics/simulator/tree/master/examples) in the Embedded Graphics Simulator project for inspiration.
//! You can use wasm-pack to create a ready to go project and add this library as a dependency.
//!
//! ```rust,no_run
//! use embedded_graphics_web_simulator::{
//!display::WebSimulatorDisplay, output_settings::OutputSettingsBuilder,
//!};
//!use wasm_bindgen::prelude::*;
//!use web_sys::console;
//!
//!use embedded_graphics::{
//! image::Image,
//! pixelcolor::{ Rgb565},
//! prelude::*,
//! primitive_style,
//!};
//!use tinybmp::Bmp;
//!
//!
//!// This is like the `main` function, except for JavaScript.
//!#[wasm_bindgen(start)]
//!pub fn main_js() -> Result<(), JsValue> {
//! // This provides better error messages in debug mode.
//! // It's disabled in release mode so it doesn't bloat up the file size.
//! #[cfg(debug_assertions)]
//! console_error_panic_hook::set_once();
//!
//! let output_settings = OutputSettingsBuilder::new().scale(3).build();
//! let mut display = WebSimulatorDisplay::new((128, 128), &output_settings);
//!
//! // Load the BMP image
//! let bmp = Bmp::from_slice(include_bytes!("./assets/rust-pride.bmp")).unwrap();
//! let image: Image<Bmp, Rgb565> = Image::new(&bmp, Point::new(32, 32));
//! image
//! .draw(&mut display)
//! .unwrap_or_else(|_| console::log_1(&"Couldn't draw image".into()));
//!
//! Ok(())
//!}
//! ```
pub mod display;
pub mod output_settings;
|
// Set direktori saat ini
//
// 8/12/2019 04:46
//
use std::env;
use std::path::Path;
fn main() {
getcwd();
let root = Path::new("/home/susilo");
let _ = env::set_current_dir(&root);
getcwd();
}
fn getcwd() {
let path = env::current_dir().unwrap();
println!("{}", path.display());
}
|
mod configuration;
mod service_registry;
use crate::service_registry::ServiceRegistry;
use api::run_server;
async fn run_create_post_command(sr: ServiceRegistry) {
let create_post_command = sr.get_create_post_command();
create_post_command.run().await.expect("failed");
}
#[tokio::main]
async fn main() {
let args: Vec<String> = std::env::args().collect();
if args.len() > 1 {
let mut sr = ServiceRegistry::new();
sr.init().await;
if args[1] == "server" {
run_server(Box::new(sr.get_post_domain())).await;
} else if args[1] == "create_post" {
run_create_post_command(sr).await;
}
}
}
|
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:edition-lint-paths.rs
// run-rustfix
// The "normal case". Ideally we would remove the `extern crate` here,
// but we don't.
#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths;
use edition_lint_paths::foo;
fn main() {
foo();
}
|
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate diesel;
extern crate r2d2;
extern crate r2d2_diesel;
extern crate rocket;
use rocket::Rocket;
use rocket::request::{Form, FlashMessage};
use rocket::response::{Flash, Redirect};
extern crate meet;
mod db {
use std::ops::Deref;
use r2d2;
use diesel::sqlite::SqliteConnection;
use r2d2_diesel::ConnectionManager;
use rocket::http::Status;
use rocket::request::{self, FromRequest};
use rocket::{Request, State, Outcome};
pub type Pool = r2d2::Pool<ConnectionManager<SqliteConnection>>;
pub const DATABASE_FILE: &'static str = env!("DATABASE_URL");
pub fn init_pool() -> Pool {
let config = r2d2::Config::default();
let manager = ConnectionManager::<SqliteConnection>::new(DATABASE_FILE);
r2d2::Pool::new(config, manager).expect("db pool")
}
pub struct Conn(pub r2d2::PooledConnection<ConnectionManager<SqliteConnection>>);
impl Deref for Conn {
type Target = SqliteConnection;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<'a, 'r> FromRequest<'a, 'r> for Conn {
type Error = ();
fn from_request(request: &'a Request<'r>) -> request::Outcome<Conn, ()> {
let pool = request.guard::<State<Pool>>()?;
match pool.get() {
Ok(conn) => Outcome::Success(Conn(conn)),
Err(_) => Outcome::Failure((Status::ServiceUnavailable, ()))
}
}
}
}
mod users {
use meet::establish_connection;
use meet::users::User;
use super::db;
#[get("/all")]
fn all(conn: db::Conn) -> String {
let activated_users = User::activated(&conn);
format!("activated users:\n{:#?}", activated_users)
}
}
fn main() {
let pool = db::init_pool();
let conn = if cfg!(test) {
Some(db::Conn(pool.get().expect("database connection for testing")))
} else {
None
};
let rocket = rocket::ignite()
.manage(pool)
.mount("/users", routes![users::all])
.launch();
}
|
#[doc = "Reader of register APB1_FZ"]
pub type R = crate::R<u32, super::APB1_FZ>;
#[doc = "Writer for register APB1_FZ"]
pub type W = crate::W<u32, super::APB1_FZ>;
#[doc = "Register APB1_FZ `reset()`'s with value 0"]
impl crate::ResetValue for super::APB1_FZ {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `DBG_TIM2_STOP`"]
pub type DBG_TIM2_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM2_STOP`"]
pub struct DBG_TIM2_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM2_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Reader of field `DBG_TIM3_STOP`"]
pub type DBG_TIM3_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM3_STOP`"]
pub struct DBG_TIM3_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM3_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Reader of field `DBG_TIM4_STOP`"]
pub type DBG_TIM4_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM4_STOP`"]
pub struct DBG_TIM4_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM4_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Reader of field `DBG_TIM5_STOP`"]
pub type DBG_TIM5_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM5_STOP`"]
pub struct DBG_TIM5_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM5_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Reader of field `DBG_TIM6_STOP`"]
pub type DBG_TIM6_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM6_STOP`"]
pub struct DBG_TIM6_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM6_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Reader of field `DBG_TIM7_STOP`"]
pub type DBG_TIM7_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM7_STOP`"]
pub struct DBG_TIM7_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM7_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Reader of field `DBG_TIM12_STOP`"]
pub type DBG_TIM12_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM12_STOP`"]
pub struct DBG_TIM12_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM12_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Reader of field `DBG_TIM13_STOP`"]
pub type DBG_TIM13_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM13_STOP`"]
pub struct DBG_TIM13_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM13_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
#[doc = "Reader of field `DBG_TIMER14_STOP`"]
pub type DBG_TIMER14_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIMER14_STOP`"]
pub struct DBG_TIMER14_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIMER14_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Reader of field `DBG_TIM18_STOP`"]
pub type DBG_TIM18_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_TIM18_STOP`"]
pub struct DBG_TIM18_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_TIM18_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
self.w
}
}
#[doc = "Reader of field `DBG_RTC_STOP`"]
pub type DBG_RTC_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_RTC_STOP`"]
pub struct DBG_RTC_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_RTC_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Reader of field `DBG_WWDG_STOP`"]
pub type DBG_WWDG_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_WWDG_STOP`"]
pub struct DBG_WWDG_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_WWDG_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
self.w
}
}
#[doc = "Reader of field `DBG_IWDG_STOP`"]
pub type DBG_IWDG_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_IWDG_STOP`"]
pub struct DBG_IWDG_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_IWDG_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of field `I2C1_SMBUS_TIMEOUT`"]
pub type I2C1_SMBUS_TIMEOUT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `I2C1_SMBUS_TIMEOUT`"]
pub struct I2C1_SMBUS_TIMEOUT_W<'a> {
w: &'a mut W,
}
impl<'a> I2C1_SMBUS_TIMEOUT_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
self.w
}
}
#[doc = "Reader of field `I2C2_SMBUS_TIMEOUT`"]
pub type I2C2_SMBUS_TIMEOUT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `I2C2_SMBUS_TIMEOUT`"]
pub struct I2C2_SMBUS_TIMEOUT_W<'a> {
w: &'a mut W,
}
impl<'a> I2C2_SMBUS_TIMEOUT_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
self.w
}
}
#[doc = "Reader of field `DBG_CAN_STOP`"]
pub type DBG_CAN_STOP_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DBG_CAN_STOP`"]
pub struct DBG_CAN_STOP_W<'a> {
w: &'a mut W,
}
impl<'a> DBG_CAN_STOP_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
self.w
}
}
impl R {
#[doc = "Bit 0 - Debug Timer 2 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim2_stop(&self) -> DBG_TIM2_STOP_R {
DBG_TIM2_STOP_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Debug Timer 3 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim3_stop(&self) -> DBG_TIM3_STOP_R {
DBG_TIM3_STOP_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Debug Timer 4 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim4_stop(&self) -> DBG_TIM4_STOP_R {
DBG_TIM4_STOP_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Debug Timer 5 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim5_stop(&self) -> DBG_TIM5_STOP_R {
DBG_TIM5_STOP_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Debug Timer 6 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim6_stop(&self) -> DBG_TIM6_STOP_R {
DBG_TIM6_STOP_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Debug Timer 7 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim7_stop(&self) -> DBG_TIM7_STOP_R {
DBG_TIM7_STOP_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Debug Timer 12 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim12_stop(&self) -> DBG_TIM12_STOP_R {
DBG_TIM12_STOP_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Debug Timer 13 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim13_stop(&self) -> DBG_TIM13_STOP_R {
DBG_TIM13_STOP_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Debug Timer 14 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_timer14_stop(&self) -> DBG_TIMER14_STOP_R {
DBG_TIMER14_STOP_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Debug Timer 18 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim18_stop(&self) -> DBG_TIM18_STOP_R {
DBG_TIM18_STOP_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Debug RTC stopped when Core is halted"]
#[inline(always)]
pub fn dbg_rtc_stop(&self) -> DBG_RTC_STOP_R {
DBG_RTC_STOP_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Debug Window Wachdog stopped when Core is halted"]
#[inline(always)]
pub fn dbg_wwdg_stop(&self) -> DBG_WWDG_STOP_R {
DBG_WWDG_STOP_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Debug Independent Wachdog stopped when Core is halted"]
#[inline(always)]
pub fn dbg_iwdg_stop(&self) -> DBG_IWDG_STOP_R {
DBG_IWDG_STOP_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 21 - SMBUS timeout mode stopped when Core is halted"]
#[inline(always)]
pub fn i2c1_smbus_timeout(&self) -> I2C1_SMBUS_TIMEOUT_R {
I2C1_SMBUS_TIMEOUT_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - SMBUS timeout mode stopped when Core is halted"]
#[inline(always)]
pub fn i2c2_smbus_timeout(&self) -> I2C2_SMBUS_TIMEOUT_R {
I2C2_SMBUS_TIMEOUT_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 25 - Debug CAN stopped when core is halted"]
#[inline(always)]
pub fn dbg_can_stop(&self) -> DBG_CAN_STOP_R {
DBG_CAN_STOP_R::new(((self.bits >> 25) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Debug Timer 2 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim2_stop(&mut self) -> DBG_TIM2_STOP_W {
DBG_TIM2_STOP_W { w: self }
}
#[doc = "Bit 1 - Debug Timer 3 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim3_stop(&mut self) -> DBG_TIM3_STOP_W {
DBG_TIM3_STOP_W { w: self }
}
#[doc = "Bit 2 - Debug Timer 4 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim4_stop(&mut self) -> DBG_TIM4_STOP_W {
DBG_TIM4_STOP_W { w: self }
}
#[doc = "Bit 3 - Debug Timer 5 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim5_stop(&mut self) -> DBG_TIM5_STOP_W {
DBG_TIM5_STOP_W { w: self }
}
#[doc = "Bit 4 - Debug Timer 6 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim6_stop(&mut self) -> DBG_TIM6_STOP_W {
DBG_TIM6_STOP_W { w: self }
}
#[doc = "Bit 5 - Debug Timer 7 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim7_stop(&mut self) -> DBG_TIM7_STOP_W {
DBG_TIM7_STOP_W { w: self }
}
#[doc = "Bit 6 - Debug Timer 12 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim12_stop(&mut self) -> DBG_TIM12_STOP_W {
DBG_TIM12_STOP_W { w: self }
}
#[doc = "Bit 7 - Debug Timer 13 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim13_stop(&mut self) -> DBG_TIM13_STOP_W {
DBG_TIM13_STOP_W { w: self }
}
#[doc = "Bit 8 - Debug Timer 14 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_timer14_stop(&mut self) -> DBG_TIMER14_STOP_W {
DBG_TIMER14_STOP_W { w: self }
}
#[doc = "Bit 9 - Debug Timer 18 stopped when Core is halted"]
#[inline(always)]
pub fn dbg_tim18_stop(&mut self) -> DBG_TIM18_STOP_W {
DBG_TIM18_STOP_W { w: self }
}
#[doc = "Bit 10 - Debug RTC stopped when Core is halted"]
#[inline(always)]
pub fn dbg_rtc_stop(&mut self) -> DBG_RTC_STOP_W {
DBG_RTC_STOP_W { w: self }
}
#[doc = "Bit 11 - Debug Window Wachdog stopped when Core is halted"]
#[inline(always)]
pub fn dbg_wwdg_stop(&mut self) -> DBG_WWDG_STOP_W {
DBG_WWDG_STOP_W { w: self }
}
#[doc = "Bit 12 - Debug Independent Wachdog stopped when Core is halted"]
#[inline(always)]
pub fn dbg_iwdg_stop(&mut self) -> DBG_IWDG_STOP_W {
DBG_IWDG_STOP_W { w: self }
}
#[doc = "Bit 21 - SMBUS timeout mode stopped when Core is halted"]
#[inline(always)]
pub fn i2c1_smbus_timeout(&mut self) -> I2C1_SMBUS_TIMEOUT_W {
I2C1_SMBUS_TIMEOUT_W { w: self }
}
#[doc = "Bit 22 - SMBUS timeout mode stopped when Core is halted"]
#[inline(always)]
pub fn i2c2_smbus_timeout(&mut self) -> I2C2_SMBUS_TIMEOUT_W {
I2C2_SMBUS_TIMEOUT_W { w: self }
}
#[doc = "Bit 25 - Debug CAN stopped when core is halted"]
#[inline(always)]
pub fn dbg_can_stop(&mut self) -> DBG_CAN_STOP_W {
DBG_CAN_STOP_W { w: self }
}
}
|
mod js_path;
mod js_path_impl_property;
pub use js_path::JsPath;
mod js_value_heq;
pub use js_value_heq::JsValueHEq;
#[cfg(test)]
mod js_path_tests;
pub mod std;
mod serde_support;
pub use serde_support::parse_ruleset;
#[cfg(test)]
mod tests;
|
use oxygengine::prelude::*;
use serde::{Deserialize, Serialize};
pub mod speed;
// component that tags entity as moved with keyboard.
#[derive(Debug, Default, Copy, Clone, Serialize, Deserialize)]
pub struct KeyboardMovementTag;
impl Component for KeyboardMovementTag {
// tag components are empty so they use `NullStorage`.
type Storage = NullStorage<Self>;
}
impl Prefab for KeyboardMovementTag {}
impl PrefabComponent for KeyboardMovementTag {}
|
#[doc = "Reader of register IER3"]
pub type R = crate::R<u32, super::IER3>;
#[doc = "Writer for register IER3"]
pub type W = crate::W<u32, super::IER3>;
#[doc = "Register IER3 `reset()`'s with value 0"]
impl crate::ResetValue for super::IER3 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `TZSCIE`"]
pub type TZSCIE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TZSCIE`"]
pub struct TZSCIE_W<'a> {
w: &'a mut W,
}
impl<'a> TZSCIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Reader of field `TZICIE`"]
pub type TZICIE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TZICIE`"]
pub struct TZICIE_W<'a> {
w: &'a mut W,
}
impl<'a> TZICIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Reader of field `MPCWM1IE`"]
pub type MPCWM1IE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCWM1IE`"]
pub struct MPCWM1IE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCWM1IE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Reader of field `MPCWM2IE`"]
pub type MPCWM2IE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCWM2IE`"]
pub struct MPCWM2IE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCWM2IE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Reader of field `MPCBB1IE`"]
pub type MPCBB1IE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCBB1IE`"]
pub struct MPCBB1IE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCBB1IE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Reader of field `MPCBB1_REGIE`"]
pub type MPCBB1_REGIE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCBB1_REGIE`"]
pub struct MPCBB1_REGIE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCBB1_REGIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Reader of field `MPCBB2IE`"]
pub type MPCBB2IE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCBB2IE`"]
pub struct MPCBB2IE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCBB2IE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Reader of field `MPCBB2_REGIE`"]
pub type MPCBB2_REGIE_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `MPCBB2_REGIE`"]
pub struct MPCBB2_REGIE_W<'a> {
w: &'a mut W,
}
impl<'a> MPCBB2_REGIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
impl R {
#[doc = "Bit 0 - TZSCIE"]
#[inline(always)]
pub fn tzscie(&self) -> TZSCIE_R {
TZSCIE_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - TZICIE"]
#[inline(always)]
pub fn tzicie(&self) -> TZICIE_R {
TZICIE_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - MPCWM1IE"]
#[inline(always)]
pub fn mpcwm1ie(&self) -> MPCWM1IE_R {
MPCWM1IE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - MPCWM2IE"]
#[inline(always)]
pub fn mpcwm2ie(&self) -> MPCWM2IE_R {
MPCWM2IE_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - MPCBB1IE"]
#[inline(always)]
pub fn mpcbb1ie(&self) -> MPCBB1IE_R {
MPCBB1IE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - MPCBB1_REGIE"]
#[inline(always)]
pub fn mpcbb1_regie(&self) -> MPCBB1_REGIE_R {
MPCBB1_REGIE_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - MPCBB2IE"]
#[inline(always)]
pub fn mpcbb2ie(&self) -> MPCBB2IE_R {
MPCBB2IE_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - MPCBB2_REGIE"]
#[inline(always)]
pub fn mpcbb2_regie(&self) -> MPCBB2_REGIE_R {
MPCBB2_REGIE_R::new(((self.bits >> 7) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - TZSCIE"]
#[inline(always)]
pub fn tzscie(&mut self) -> TZSCIE_W {
TZSCIE_W { w: self }
}
#[doc = "Bit 1 - TZICIE"]
#[inline(always)]
pub fn tzicie(&mut self) -> TZICIE_W {
TZICIE_W { w: self }
}
#[doc = "Bit 2 - MPCWM1IE"]
#[inline(always)]
pub fn mpcwm1ie(&mut self) -> MPCWM1IE_W {
MPCWM1IE_W { w: self }
}
#[doc = "Bit 3 - MPCWM2IE"]
#[inline(always)]
pub fn mpcwm2ie(&mut self) -> MPCWM2IE_W {
MPCWM2IE_W { w: self }
}
#[doc = "Bit 4 - MPCBB1IE"]
#[inline(always)]
pub fn mpcbb1ie(&mut self) -> MPCBB1IE_W {
MPCBB1IE_W { w: self }
}
#[doc = "Bit 5 - MPCBB1_REGIE"]
#[inline(always)]
pub fn mpcbb1_regie(&mut self) -> MPCBB1_REGIE_W {
MPCBB1_REGIE_W { w: self }
}
#[doc = "Bit 6 - MPCBB2IE"]
#[inline(always)]
pub fn mpcbb2ie(&mut self) -> MPCBB2IE_W {
MPCBB2IE_W { w: self }
}
#[doc = "Bit 7 - MPCBB2_REGIE"]
#[inline(always)]
pub fn mpcbb2_regie(&mut self) -> MPCBB2_REGIE_W {
MPCBB2_REGIE_W { w: self }
}
}
|
use rand::Rng;
use crate::battle_snake::structs::{POSSIBLE_MOVES, Point, GameEnvironment, Move, Snake};
use crate::battle_snake::map::{generate_map, get_valid_moves, move_toward};
pub fn is_occupied(snakes: &Vec<Snake>, location: &Point) -> bool {
for snake in snakes.iter() {
for body_part in snake.body.iter() {
// println!("is_occupied: body_part x: {}, y: {}", body_part.x, body_part.y);
// println!("is_occupied: location x: {}, y: {}", location.x, location.y);
if body_part.x == location.x && body_part.y == location.y {
return true;
}
}
}
return false;
}
pub fn is_out_of_bounds(width: &u8, height: &u8, location: &Point) -> bool {
let out_of_bounds = (location.x >= *width) || (location.y >= *height);
println!("out of bounds {}", out_of_bounds);
return out_of_bounds;
}
pub fn is_valid_move(data: &GameEnvironment, movement: &Move) -> bool {
let head_position = &data.you.body[0];
let new_position = match movement {
Move::Left => {
if head_position.x == 0 {
return false;
} else {
Point { x: head_position.x - 1, y: head_position.y }
}
}
Move::Right => Point { x: head_position.x + 1, y: head_position.y },
Move::Up => {
if head_position.y == 0 {
return false;
} else {
Point { x: head_position.x, y: head_position.y - 1 }
}
}
Move::Down => Point { x: head_position.x, y: head_position.y + 1 },
};
println!("is_valid_move: x: {}, y: {}", new_position.x, new_position.y);
let out_of_bounds: bool = is_out_of_bounds(&data.board.width, &data.board.height, &new_position);
if out_of_bounds {
return !out_of_bounds;
}
return !is_occupied(&data.board.snakes, &new_position);
}
// Randomly move in any direction that is not occupied by a snake
// including yourself, and walls
#[allow(dead_code)]
pub fn random_v0(data: GameEnvironment) -> Move {
println!("calculating valid moves");
let valid_moves: Vec<&Move> = POSSIBLE_MOVES
.iter()
.filter(|m| is_valid_move(&data, *m))
.collect();
println!("valid moves: {}", valid_moves.len());
let movement_number: usize = rand::thread_rng().gen_range(0, valid_moves.len());
return valid_moves[movement_number].clone();
}
#[allow(dead_code)]
pub fn random_v1(data: GameEnvironment) -> Move {
// 1. Generate grid
let map = generate_map(&data);
// 2. Cull invalid moves
let valid_moves = get_valid_moves(&map, &data.you);
// 3. Randomly choose between valid moves
let movement_number: usize = rand::thread_rng().gen_range(0, valid_moves.len());
return valid_moves[movement_number].clone();
}
#[allow(dead_code)]
pub fn chase_tail(data: GameEnvironment) -> Move {
// 1. Generate grid
let map = generate_map(&data);
// 2. Cull invalid moves
let valid_moves = get_valid_moves(&map, &data.you);
println!("Valid Moves: {:?}", valid_moves);
// 3. Choose move that goes toward your own tail
let my_body = &map.snakes[&map.you].body;
let my_head = my_body[0].clone();
let my_tail = my_body[my_body.len() - 1].clone();
let tail_moves = move_toward(&my_head, &my_tail, &valid_moves);
println!("Tail Moves: {:?}", tail_moves);
// 4. Randomly choose between moves that chase your own tail
let movement_number: usize = rand::thread_rng().gen_range(0, tail_moves.len());
return valid_moves[movement_number].clone();
}
// TODO: evaluate moves on a lifetime count basis? |
use crate::prelude::*;
use crate::textures::Texture;
use std::collections::{HashMap, HashSet, VecDeque};
use crate::sounds::{SoundId, Sounds};
#[derive(Clone, Default)]
pub struct Level {
old_events: Option<Events>,
pub n_tile_changes: u32,
entity_id_ctr: u32,
pub has_won: bool,
pub data: LevelData,
pub undo_stack: Vec<LevelData>,
player_id: u32,
}
// All the data for a level state
#[derive(Clone, Default)]
pub struct LevelData {
pub entities: HashMap<u32, Entity>,
pub active_events: Events,
pub tiles: Tilemap,
pub n_humans: usize,
pub has_input: bool,
}
impl Level {
pub fn several_from_string(input: &str) -> Result<Vec<Level>, String> {
let mut level: Level = Default::default();
let mut levels = Vec::new();
let mut making_level = false;
let mut has_player = false;
let lines = input.lines().rev().map(|v| v.trim());
let mut y = 0;
for line in lines {
if line.len() == 0 || line.starts_with("//") {
// If
if making_level {
if !has_player {
return Err(format!("Expected player"));
}
levels.insert(
0,
std::mem::replace(&mut level, Default::default())
);
making_level = false;
has_player = false;
}
continue;
}
if making_level == false {
y = 0;
}
making_level = true;
if level.width() == 0 {
level.data.tiles.width = line.len();
}else if level.width() != line.len() {
return Err(format!("Expected the same width for every line"));
}
level.data.tiles.height += 1;
for (x, char_) in line.chars().enumerate() {
level.data.tiles.buffer.push(match char_ {
// Entities
'p' | 'P' => {
if has_player {
return
Err(format!("Cannot have more than 1 player!"));
}
has_player = true;
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x as isize, y as isize, EntityKind::Player));
level.player_id = level.entity_id_ctr;
level.entity_id_ctr += 1;
if char_.is_uppercase() { Tile::Ice } else { Tile::Floor(FloorKind::Standard) }
}
'g' | 'G' => {
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x as isize, y as isize, EntityKind::BucketOfGoop));
level.entity_id_ctr += 1;
if char_.is_uppercase() { Tile::IceWithGoop } else { Tile::FloorWithGoop }
}
'b' | 'B' => {
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x as isize, y as isize, EntityKind::Human));
level.entity_id_ctr += 1;
level.data.n_humans += 1;
if char_.is_uppercase() { Tile::Ice } else { Tile::Floor(FloorKind::Standard) }
}
'c' | 'C' => {
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x as isize, y as isize, EntityKind::Cake));
level.entity_id_ctr += 1;
if char_.is_uppercase() { Tile::Ice } else { Tile::Floor(FloorKind::Standard) }
}
// Tiles
'.' => Tile::Floor(FloorKind::Standard),
',' => Tile::Floor(FloorKind::Mossy),
'#' => Tile::Wall(WallKind::Void),
':' => Tile::Wall(WallKind::Grass),
';' => Tile::Wall(WallKind::Flowers),
'H' => Tile::Home,
'S' => Tile::SadHome,
'%' => Tile::Ice,
c => return Err(format!("Unknown character {}", c)),
});
}
y += 1;
}
if making_level {
levels.insert(0, level);
}
println!("Loaded {} levels", levels.len());
Ok(levels)
}
pub fn randomized() -> Level {
let width = 8;
let height = 8;
let n_house = 3;
let n_sad_house = 2;
let n_extra_cake = 4;
let n_goops = 3;
let n_wall = 7;
let n_ice = 5;
let mut level: Level = Default::default();
level.data.tiles.width = width;
level.data.tiles.height = height;
level.data.tiles.buffer = vec![
Tile::Floor(FloorKind::Standard);
width * height
];
let mut tiles = HashSet::new();
for x in 0..width {
for y in 0..height {
tiles.insert([x as isize, y as isize]);
}
}
let mut tiles = tiles.drain();
for _ in 0..n_wall {
level.data.tiles.set_tile(
tiles.next().unwrap(),
Tile::Wall(WallKind::Void),
);
}
for _ in 0..n_ice {
level.data.tiles.set_tile(
tiles.next().unwrap(),
Tile::Ice,
);
}
for _ in 0..n_house {
level.data.tiles.set_tile(
tiles.next().unwrap(),
Tile::Home,
);
}
for _ in 0..n_sad_house {
level.data.tiles.set_tile(
tiles.next().unwrap(),
Tile::SadHome,
);
}
let old_tiles = tiles;
let mut tiles = HashSet::new();
for tile in old_tiles {
if tile[0] == 0 || tile[1] == 0
|| tile[0] == width as isize - 1 || tile[1] == height as isize - 1
{
continue;
}
// Cornders not allowed!
if level.tile_is_solid([tile[0] - 1, tile[1]]) &&
level.tile_is_solid([tile[0], tile[1] - 1]) {
continue;
}
if level.tile_is_solid([tile[0] + 1, tile[1]]) &&
level.tile_is_solid([tile[0], tile[1] - 1]) {
continue;
}
if level.tile_is_solid([tile[0] - 1, tile[1]]) &&
level.tile_is_solid([tile[0], tile[1] + 1]) {
continue;
}
if level.tile_is_solid([tile[0] + 1, tile[1]]) &&
level.tile_is_solid([tile[0], tile[1] + 1]) {
continue;
}
tiles.insert(tile);
}
let mut tiles = tiles.drain();
// Player!
let [x, y] = tiles.next().unwrap();
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x, y, EntityKind::Player));
level.player_id = level.entity_id_ctr;
level.entity_id_ctr += 1;
for _ in 0..n_goops {
let [x, y] = tiles.next().unwrap();
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x, y, EntityKind::BucketOfGoop));
level.data.tiles.set_tile([x, y], Tile::FloorWithGoop);
level.entity_id_ctr += 1;
}
// Cakes
for _ in 0..(n_sad_house + n_extra_cake) {
let [x, y] = tiles.next().unwrap();
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x, y, EntityKind::Cake));
level.entity_id_ctr += 1;
}
// Humans
for _ in 0..(n_house + n_sad_house) {
let [x, y] = tiles.next().unwrap();
level.data.entities.insert(level.entity_id_ctr,
Entity::new(x, y, EntityKind::Human));
level.entity_id_ctr += 1;
level.data.n_humans += 1;
}
level
}
#[inline]
pub fn width(&self) -> usize {
self.data.tiles.width
}
#[inline]
pub fn height(&self) -> usize {
self.data.tiles.height
}
pub fn input(&mut self, input: Direction) {
for move_ in self.data.active_events.moves.iter() {
if move_.entity_id == self.player_id {
return;
}
}
self.data.has_input = true;
let entity = self.data.entities.get(&self.player_id).unwrap();
let is_friction_push =
match self.data.tiles.get_tile(entity.pos).unwrap() {
Tile::Ice => false,
_ => true
};
let move_ = MoveEntity {
is_friction_push,
..MoveEntity::new(self.player_id, entity.pos, input)
};
// TODO: Only add an undo state when something actually happens.
self.undo_stack.push(self.data.clone());
self.data.active_events.moves.push(move_);
}
pub fn tile_is_solid(&self, pos: [isize; 2]) -> bool {
if pos[0] < 0 || pos[0] as usize >= self.width() ||
pos[1] < 0 || pos[1] as usize >= self.height()
{
return true;
}
match self.data.tiles.get_tile(pos).unwrap() {
Tile::Wall(_) => return true,
_ => (),
}
for entity in self.data.entities.values() {
if entity.pos == pos {
return true;
}
}
false
}
fn get_entity_at_tile(&self, pos: [isize; 2]) -> Option<u32> {
for (&id, entity) in self.data.entities.iter() {
if entity.pos == pos {
return Some(id);
}
}
None
}
// @Cleanup: Remove the Sounds import here, and instead cycle through the
// animations and apply sounds that way.
// @Cleanup: Make undo only save states where you move and push
// something/slide on ice.
pub fn update(&mut self, animations: &mut VecDeque<Animation>, sounds: &Sounds) {
let mut events = std::mem::replace(
&mut self.data.active_events,
self.old_events.take().unwrap_or_else(|| Events::new()),
);
let mut new_events = Events::new();
// Pushing things
let mut index = 0;
let mut pushing_happened = false;
'outer: while index < events.moves.len() {
let move_ = events.moves[index];
let to = move_.to();
if let Some(id) = self.get_entity_at_tile(to) {
let one_self = self.data.entities.get(&move_.entity_id).unwrap();
let entity = self.data.entities.get(&id).unwrap();
// If the things in question is already moving out of the way,
// increase the priority of that, and then move on!
//
// @Cleanup: This method of doing things is silly. The
// ``i == events.moves.len() - 1`` is just a hack to not make
// it get stuck in an infinite loop.
for (i, other_move) in events.moves.iter().enumerate() {
if other_move.from == to {
if i == events.moves.len() - 1 {
// With the last move this is a noop?
println!("The last move is having trouble");
break;
}
let other_move = events.moves.remove(i);
events.moves.push(other_move);
continue 'outer;
}
}
if (one_self.kind == EntityKind::HumanWithGoop && entity.kind == EntityKind::Cake) ||
(one_self.kind == EntityKind::Cake && entity.kind == EntityKind::HumanWithGoop)
{
// The goop child eats the cake!
let other = self.data.entities.get_mut(&id).unwrap();
other.kind = EntityKind::Human;
let other_pos = other.pos;
let me = self.data.entities.get_mut(&move_.entity_id).unwrap();
let me_pos = me.pos;
animations.push_back(Animation::Move {
from: me_pos,
to: other_pos,
entity_id: move_.entity_id,
accelerate: !me.is_sliding,
decelerate: true,
kind: AnimationMoveKind::Apply,
});
animations.push_back(Animation::Goopify { entity_id: id, kind: EntityKind::Human });
events.moves.remove(index);
self.data.entities.remove(&move_.entity_id);
continue;
}
match (
self.data.tiles.get_tile(one_self.pos).unwrap(),
self.data.tiles.get_tile(entity.pos).unwrap(),
) {
(_, Tile::Ice) if !move_.is_friction_push => {
// If something isn't based on friction, and the target
// is on ice, then transfer the energy, don't push!
events.moves.remove(index);
animations.push_back(Animation::Move {
entity_id: move_.entity_id,
from: one_self.pos,
to: entity.pos,
accelerate: !one_self.is_sliding,
decelerate: true,
kind: AnimationMoveKind::IceKick,
});
let move_ = MoveEntity::new(
id,
entity.pos,
move_.direction,
);
events.moves.push(move_);
}
(_, _) => {
// Just normal pushing
let move_ = MoveEntity {
is_friction_push: true,
..MoveEntity::new(id, entity.pos, move_.direction)
};
events.moves.push(move_);
index += 1;
pushing_happened = true;
}
};
} else {
// No pushing!
index += 1;
}
}
if pushing_happened {
sounds.play(SoundId::Push, 0.4);
}
// TODO: Resolve move conflicts
// Run all the moves
// It's run in reverse because the moves resulting from pushing
// are always further back in the list, so if we reverse it those
// are moved first, which allows the pushers to also be moved.
for move_ in events.moves.iter().rev() {
let to = move_.to();
if self.tile_is_solid(to) {
let entity = self.data.entities.get(&move_.entity_id).unwrap();
animations.push_back(Animation::FailedMove {
entity_id: move_.entity_id,
from: move_.from,
to,
accelerate: !entity.is_sliding,
});
continue;
}
let entity = self.data.entities.get(&move_.entity_id).unwrap();
if entity.kind == EntityKind::BucketOfGoop {
match self.data.tiles.get_tile(move_.to()).unwrap() {
Tile::Ice => {
self.data.tiles.set_tile(move_.to(), Tile::IceWithGoop);
self.n_tile_changes += 1;
}
Tile::Floor(_) => {
self.data.tiles.set_tile(move_.to(), Tile::FloorWithGoop);
self.n_tile_changes += 1;
}
Tile::Home | Tile::SadHome => {
// Cannot move Bucket of Goop onto houses.
animations.push_back(Animation::FailedMove {
entity_id: move_.entity_id,
from: move_.from,
to,
accelerate: !entity.is_sliding,
});
continue;
}
_ => (),
}
}
let entity = self.data.entities.get_mut(&move_.entity_id).unwrap();
match self.data.tiles.get_tile(to).unwrap() {
Tile::Ice => {
new_events.moves.push(MoveEntity {
..MoveEntity::new(move_.entity_id, to, move_.direction)
});
},
Tile::IceWithGoop => {
// new_events.moves.push(MoveEntity {
// ..MoveEntity::new(move_.entity_id, to, move_.direction)
// });
entity.goopify();
animations.push_back(Animation::Goopify { entity_id: move_.entity_id, kind: entity.kind });
}
Tile::FloorWithGoop => {
entity.goopify();
animations.push_back(Animation::Goopify { entity_id: move_.entity_id, kind: entity.kind });
},
_ => (),
}
entity.pos = to;
let mut moving_to_ice = false;
if self.data.tiles.get_tile(to) == Some(Tile::Ice) {
moving_to_ice = true;
}
animations.push_back(Animation::Move {
entity_id: move_.entity_id,
from: move_.from,
to,
accelerate: !entity.is_sliding,
decelerate: !moving_to_ice,
kind: AnimationMoveKind::Standard,
});
entity.is_sliding = moving_to_ice;
}
// Entities that modify tiles
let mut entities_to_remove = Vec::new();
for (&entity_id, entity) in self.data.entities.iter() {
let mut modified_tile = false;
match (entity.kind, self.data.tiles.get_tile(entity.pos).unwrap()) {
(EntityKind::Human, Tile::Home) => {
self.data.tiles.set_tile(
entity.pos,
Tile::Wall(WallKind::HappyHome),
);
self.data.n_humans -= 1;
if self.data.n_humans == 0 {
self.has_won = true;
}
modified_tile = true;
}
(EntityKind::Cake, Tile::SadHome) => {
self.data.tiles.set_tile(entity.pos, Tile::Home);
modified_tile = true;
}
_ => (),
}
if modified_tile {
self.n_tile_changes += 1;
let mut from = entity.pos;
let to = entity.pos;
let mut accelerate = false;
for (i, animation) in animations.iter().enumerate() {
if let Animation::Move {
from: anim_from,
to: anim_to,
accelerate: anim_accelerate,
kind: AnimationMoveKind::Standard,
..
} = *animation {
if anim_to == from {
accelerate = anim_accelerate;
from = anim_from;
animations.remove(i);
break;
}
}
}
animations.push_back(Animation::Move {
entity_id,
from,
to,
accelerate,
decelerate: false,
kind: AnimationMoveKind::Apply,
});
entities_to_remove.push(entity_id);
}
}
for entity in entities_to_remove {
self.data.entities.remove(&entity);
}
if self.data.has_input {
sounds.play(SoundId::SpiderWalk, 0.3);
self.data.has_input = false;
}
self.data.active_events = new_events;
self.old_events = Some(events);
}
}
#[derive(Clone, Default)]
pub struct Tilemap {
pub width: usize,
pub height: usize,
pub buffer: Vec<Tile>,
}
impl Tilemap {
pub fn get_tile(&self, pos: [isize; 2]) -> Option<Tile> {
debug_assert_eq!(self.buffer.len(), self.width * self.height);
if pos[0] < 0 || pos[0] as usize >= self.width
|| pos[1] < 0 || pos[1] as usize >= self.height {
return None;
}
// SAFETY: The bounds check is up above
unsafe {
Some(*self.buffer.get_unchecked(
pos[0] as usize + pos[1] as usize * self.width
))
}
}
/// Sets a tile
///
/// # Panics
/// If the tile is out of bounds.
pub fn set_tile(&mut self, pos: [isize; 2], tile: Tile) {
debug_assert_eq!(self.buffer.len(), self.width * self.height);
if pos[0] < 0 || pos[0] as usize >= self.width
|| pos[1] < 0 || pos[1] as usize >= self.height {
panic!("Tried setting a tile out of bounds!");
}
// SAFETY: The bounds check is up above
unsafe {
*self.buffer.get_unchecked_mut(
pos[0] as usize + pos[1] as usize * self.width
) = tile;
}
}
}
#[derive(Clone, Copy)]
pub enum AnimationMoveKind {
Standard,
IceKick,
Apply,
}
#[derive(Clone, Copy)]
pub enum Animation {
Move {
entity_id: u32,
from: [isize; 2],
to: [isize; 2],
accelerate: bool,
decelerate: bool,
kind: AnimationMoveKind,
},
FailedMove {
entity_id: u32,
from: [isize; 2],
to: [isize; 2],
accelerate: bool,
},
// TODO: Add particles of goop when something is goopified
Goopify { entity_id: u32, kind: EntityKind },
}
#[derive(Clone, Default)]
pub struct Events {
pub moves: Vec<MoveEntity>,
}
impl Events {
fn new() -> Events {
Events {
moves: Vec::new(),
}
}
pub fn empty(&self) -> bool {
self.moves.len() == 0
}
}
#[derive(Clone, Copy)]
pub struct MoveEntity {
is_friction_push: bool,
entity_id: u32,
from: [isize; 2],
direction: Direction,
}
impl MoveEntity {
fn new(entity_id: u32, from: [isize; 2], direction: Direction) -> Self {
MoveEntity {
is_friction_push: false,
entity_id,
from,
direction,
}
}
pub fn to(&self) -> [isize; 2] {
match self.direction {
Direction::Right => [self.from[0] + 1, self.from[1] ],
Direction::Up => [self.from[0] , self.from[1] + 1],
Direction::Left => [self.from[0] - 1, self.from[1] ],
Direction::Down => [self.from[0] , self.from[1] - 1],
}
}
}
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum FloorKind {
Standard,
Mossy,
}
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum WallKind {
Void,
Grass,
Flowers,
HappyHome,
}
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum Tile {
Floor(FloorKind),
Wall(WallKind),
SadHome,
Home,
Ice,
FloorWithGoop,
IceWithGoop,
}
impl Tile {
pub fn graphics(self) -> [Option<TileGraphics>; 3] {
use Tile::*;
let mut values = [None; 3];
// The base tilemap.
values[0] = match self {
Floor(FloorKind::Standard) | SadHome | Home | FloorWithGoop =>
Some(TileGraphics::Tilemap {
atlas: Texture::FloorMap,
connects_to_tile: |tile| match tile {
Wall(_) => false,
Ice => false,
IceWithGoop => false,
_ => true
},
}),
Floor(FloorKind::Mossy) =>
Some(TileGraphics::Tilemap {
atlas: Texture::MossyMap,
connects_to_tile: |tile| match tile {
Wall(_) => false,
Ice => false,
IceWithGoop => false,
_ => true
},
}),
Wall(WallKind::Void) => Some(TileGraphics::Tilemap {
atlas: Texture::VoidMap,
connects_to_tile: |tile| match tile {
Wall(WallKind::Void) => false,
_ => true,
}
}),
Wall(WallKind::Grass) => Some(TileGraphics::Texture(Texture::Grass)),
Wall(WallKind::Flowers) => Some(TileGraphics::Tilemap {
atlas: Texture::FlowerMap,
connects_to_tile: |tile| match tile {
Wall(WallKind::Flowers) => true,
_ => false,
}
}),
Wall(WallKind::HappyHome) => None,
Ice | IceWithGoop =>
Some(TileGraphics::Tilemap {
atlas: Texture::IceMap,
connects_to_tile: |tile| match tile {
Ice | IceWithGoop => true,
_ => false,
},
})
};
// The tile texture
values[1] = match self {
Wall(WallKind::HappyHome) =>
Some(TileGraphics::Texture(Texture::HappyHome)),
SadHome => Some(TileGraphics::Texture(Texture::SadHome)),
Home => Some(TileGraphics::Texture(Texture::Home)),
_ => None,
};
// Goop layer
values[2] = match self {
IceWithGoop | FloorWithGoop => Some(TileGraphics::Tilemap {
atlas: Texture::GoopMap,
connects_to_tile: |tile| match tile {
IceWithGoop | FloorWithGoop => true,
_ => false
},
}),
_ => None,
};
values
}
}
#[derive(Clone, Copy)]
pub enum TileGraphics {
Texture(Texture),
Tilemap {
atlas: Texture,
connects_to_tile: fn(Tile) -> bool,
},
}
#[derive(Clone, Copy)]
pub struct Entity {
pub pos: [isize; 2],
pub kind: EntityKind,
pub is_sliding: bool,
}
impl Entity {
pub fn new(x: isize, y: isize, kind: EntityKind) -> Self {
Entity { pos: [x, y], kind, is_sliding: false, }
}
pub fn goopify(&mut self) {
match self.kind {
EntityKind::Cake => self.kind = EntityKind::CakeWithGoop,
EntityKind::Human => self.kind = EntityKind::HumanWithGoop,
_ => (),
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EntityKind {
Player,
Human,
Cake,
BucketOfGoop,
HumanWithGoop,
CakeWithGoop,
}
impl EntityKind {
pub fn get_texture(&self) -> Texture {
match self {
EntityKind::Player => Texture::Player,
EntityKind::Human => Texture::Human,
EntityKind::Cake => Texture::Cake,
EntityKind::BucketOfGoop => Texture::BucketOfGoop,
EntityKind::HumanWithGoop => Texture::HumanWithGoop,
EntityKind::CakeWithGoop => Texture::CakeWithGoop,
}
}
}
|
use super::raw_path::string_or_struct;
pub(crate) use super::raw_path::RawPath;
use crate::rule::rule_path::RulePath;
use crate::severity::Severity;
use serde::Deserialize;
/// "raw" Rule
#[derive(Debug, Clone, Deserialize, PartialOrd, PartialEq)]
pub(crate) struct RawRule {
name: String,
#[serde(deserialize_with = "string_or_struct")]
path: RawPath,
content: Option<String>,
severity: Severity,
}
impl RawRule {
pub fn is_regex_path(&self) -> bool {
self.path.is_regex()
}
pub fn path_ref(&self) -> &str {
self.path.as_str()
}
pub fn name(&self) -> &str {
&self.name
}
#[allow(unused)]
pub fn path(&self) -> RulePath {
RulePath::String(self.path.as_str().to_owned())
}
pub fn content(&self) -> Option<String> {
self.content.clone()
}
pub fn severity(&self) -> Severity {
self.severity
}
}
|
//use crate::render::TextureUnit;
use std::cell::RefCell;
use std::rc::Rc;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;
use web_sys::HtmlImageElement;
use web_sys::WebGl2RenderingContext;
pub fn load_texture_image(context: &WebGl2RenderingContext, src: &str) {
// let image = Rc::new(RefCell::new(HtmlImageElement::new().unwrap()));
// let image_clone = Rc::clone(&image);
let image = HtmlImageElement::new().unwrap();
let texture = context.create_texture();
context.active_texture(WebGl2RenderingContext::TEXTURE0);
context.bind_texture(WebGl2RenderingContext::TEXTURE_2D, texture.as_ref());
context.pixel_storei(WebGl2RenderingContext::UNPACK_FLIP_Y_WEBGL, 1);
context.tex_parameteri(WebGl2RenderingContext::TEXTURE_2D, WebGl2RenderingContext::TEXTURE_MIN_FILTER, WebGl2RenderingContext::NEAREST as i32);
context.tex_parameteri(WebGl2RenderingContext::TEXTURE_2D, WebGl2RenderingContext::TEXTURE_MAG_FILTER, WebGl2RenderingContext::NEAREST as i32);
context.tex_image_2d_with_u32_and_u32_and_html_image_element(
WebGl2RenderingContext::TEXTURE_2D,
0,
WebGl2RenderingContext::RGBA as i32,
WebGl2RenderingContext::RGBA,
WebGl2RenderingContext::UNSIGNED_BYTE,
&image,
).expect("Texture image 2d");
// image.set_onload(Some(onload.as_ref().unchecked_ref()));
// onload.forget();
// let image_clone = Rc::clone(&image);
//
// let onload = Closure::wrap(Box::new(move || {
// let texture = context.create_texture();
// context.active_texture(WebGl2RenderingContext::TEXTURE0);
// context.bind_texture(WebGl2RenderingContext::TEXTURE_2D, texture.as_ref());
// context.pixel_storei(WebGl2RenderingContext::UNPACK_FLIP_Y_WEBGL, 1);
// context.tex_parameteri(WebGl2RenderingContext::TEXTURE_2D, WebGl2RenderingContext::TEXTURE_MIN_FILTER, WebGl2RenderingContext::NEAREST as i32);
// context.tex_parameteri(WebGl2RenderingContext::TEXTURE_2D, WebGl2RenderingContext::TEXTURE_MAG_FILTER, WebGl2RenderingContext::NEAREST as i32);
// context.tex_image_2d_with_u32_and_u32_and_html_image_element(
// WebGl2RenderingContext::TEXTURE_2D,
// 0,
// WebGl2RenderingContext::RGBA as i32,
// WebGl2RenderingContext::RGBA,
// WebGl2RenderingContext::UNSIGNED_BYTE,
// &image_clone.borrow(),
// ).expect("Texture image 2d");
// }) as Box<dyn Fn()>);
//
// let image = image.borrow_mut();
//
// image.set_onload(Some(onload.as_ref().unchecked_ref()));
// image.set_src(src);
//
// onload.forget();
}
|
// 字母
pub fn is_alpha(c: &char) -> bool {
match *c {
'A'...'Z' => true,
'a'...'z' => true,
'_' => true,
_ => false,
}
}
// 数字
pub fn is_number(c: &char) -> bool {
match *c {
'0'...'9' => true,
_ => false,
}
}
pub fn is_space(c: &char) -> bool {
match *c {
' ' | '\t' | '\n' | '\r' => true,
_ => false,
}
}
#[derive(Debug, Default, Clone)]
pub struct Msg {
pub chars: Vec<char>,
pub next: usize,
}
impl Msg {
pub fn new<S: AsRef<str>>(msg: S) -> Self {
Msg {
chars: msg.as_ref().chars().collect(),
next: 0,
}
}
pub fn peek(&self) -> Option<&char> {
if self.next + 1 <= self.chars.len() {
Some(&self.chars[self.next])
} else {
None
}
}
pub fn parse_number(&mut self, c: &char) -> Result<f64, String> {
// 从str里parse尽量多的字节作为f64
let colon_count = if *c == '.' { 1 } else { 0 };
let mut s = String::new();
if *c == '.' && self.peek().is_none() {
Err(format!("\"{}{}\" starts_with a invalid number!", c, self))?;
} else if *c == '.' && is_number(self.peek().unwrap()) {
s.push('0');
s.push(*c);
} else if *c == '.' && self.peek().is_some() {
Err(format!("\"{}{}\" starts_with a invalid number!", c, self))?;
} else {
s.push(*c);
}
loop {
if self.peek().is_none() ||
self.peek() != Some(&&'.') && !is_number(self.peek().unwrap())
{
break;
}
let cc = self.next().unwrap();
if cc == '.' && colon_count >= 1 {
Err(format!("\"{}{}\" contains a invalid number!", s, self))?;
} else {
s.push(cc);
}
}
Ok(s.parse::<f64>().unwrap())
}
}
use std::fmt;
impl fmt::Display for Msg {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut idx = self.next;
loop {
if idx + 1 > self.chars.len() {
break;
}
write!(f, "{}", self.chars[idx])?;
idx += 1;
}
Ok(())
}
}
impl Iterator for Msg {
type Item = char;
fn next(&mut self) -> Option<Self::Item> {
let next = self.next;
if next + 1 <= self.chars.len() {
self.next += 1;
Some(self.chars[next])
} else {
None
}
}
} |
# ! [ doc = "Reset and clock control" ]
# [ doc = r" Register block" ]
# [ repr ( C ) ]
pub struct Rcc {
# [ doc = "0x00 - Clock control register" ]
pub cr: Cr,
# [ doc = "0x04 - Clock configuration register (RCC_CFGR)" ]
pub cfgr: Cfgr,
# [ doc = "0x08 - Clock interrupt register (RCC_CIR)" ]
pub cir: Cir,
# [ doc = "0x0c - APB2 peripheral reset register (RCC_APB2RSTR)" ]
pub apb2rstr: Apb2rstr,
# [ doc = "0x10 - APB1 peripheral reset register (RCC_APB1RSTR)" ]
pub apb1rstr: Apb1rstr,
# [ doc = "0x14 - AHB Peripheral Clock enable register (RCC_AHBENR)" ]
pub ahbenr: Ahbenr,
# [ doc = "0x18 - APB2 peripheral clock enable register (RCC_APB2ENR)" ]
pub apb2enr: Apb2enr,
# [ doc = "0x1c - APB1 peripheral clock enable register (RCC_APB1ENR)" ]
pub apb1enr: Apb1enr,
# [ doc = "0x20 - Backup domain control register (RCC_BDCR)" ]
pub bdcr: Bdcr,
# [ doc = "0x24 - Control/status register (RCC_CSR)" ]
pub csr: Csr,
# [ doc = "0x28 - AHB peripheral reset register" ]
pub ahbrstr: Ahbrstr,
# [ doc = "0x2c - Clock configuration register 2" ]
pub cfgr2: Cfgr2,
# [ doc = "0x30 - Clock configuration register 3" ]
pub cfgr3: Cfgr3,
# [ doc = "0x34 - Clock control register 2" ]
pub cr2: Cr2,
}
# [ doc = "Clock control register" ]
# [ repr ( C ) ]
pub struct Cr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock control register" ]
pub mod cr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field HSION" ]
pub struct HsionR {
bits: u8,
}
impl HsionR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSIRDY" ]
pub struct HsirdyR {
bits: u8,
}
impl HsirdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSITRIM" ]
pub struct HsitrimR {
bits: u8,
}
impl HsitrimR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSICAL" ]
pub struct HsicalR {
bits: u8,
}
impl HsicalR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSEON" ]
pub struct HseonR {
bits: u8,
}
impl HseonR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSERDY" ]
pub struct HserdyR {
bits: u8,
}
impl HserdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSEBYP" ]
pub struct HsebypR {
bits: u8,
}
impl HsebypR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CSSON" ]
pub struct CssonR {
bits: u8,
}
impl CssonR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLON" ]
pub struct PllonR {
bits: u8,
}
impl PllonR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLRDY" ]
pub struct PllrdyR {
bits: u8,
}
impl PllrdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _HsionW<'a> {
register: &'a mut W,
}
impl<'a> _HsionW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HsitrimW<'a> {
register: &'a mut W,
}
impl<'a> _HsitrimW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 31;
const OFFSET: u8 = 3;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HseonW<'a> {
register: &'a mut W,
}
impl<'a> _HseonW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HsebypW<'a> {
register: &'a mut W,
}
impl<'a> _HsebypW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CssonW<'a> {
register: &'a mut W,
}
impl<'a> _CssonW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllonW<'a> {
register: &'a mut W,
}
impl<'a> _PllonW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _hsion(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - Internal High Speed clock enable" ]
pub fn hsion(&self) -> HsionR {
HsionR { bits: self._hsion() }
}
fn _hsirdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - Internal High Speed clock ready flag" ]
pub fn hsirdy(&self) -> HsirdyR {
HsirdyR { bits: self._hsirdy() }
}
fn _hsitrim(&self) -> u8 {
const MASK: u8 = 31;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 3:7 - Internal High Speed clock trimming" ]
pub fn hsitrim(&self) -> HsitrimR {
HsitrimR { bits: self._hsitrim() }
}
fn _hsical(&self) -> u8 {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 8:15 - Internal High Speed clock Calibration" ]
pub fn hsical(&self) -> HsicalR {
HsicalR { bits: self._hsical() }
}
fn _hseon(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 16 - External High Speed clock enable" ]
pub fn hseon(&self) -> HseonR {
HseonR { bits: self._hseon() }
}
fn _hserdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - External High Speed clock ready flag" ]
pub fn hserdy(&self) -> HserdyR {
HserdyR { bits: self._hserdy() }
}
fn _hsebyp(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - External High Speed clock Bypass" ]
pub fn hsebyp(&self) -> HsebypR {
HsebypR { bits: self._hsebyp() }
}
fn _csson(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 19 - Clock Security System enable" ]
pub fn csson(&self) -> CssonR {
CssonR { bits: self._csson() }
}
fn _pllon(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 24 - PLL enable" ]
pub fn pllon(&self) -> PllonR {
PllonR { bits: self._pllon() }
}
fn _pllrdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 25 - PLL clock ready flag" ]
pub fn pllrdy(&self) -> PllrdyR {
PllrdyR { bits: self._pllrdy() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 131 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - Internal High Speed clock enable" ]
pub fn hsion(&mut self) -> _HsionW {
_HsionW { register: self }
}
# [ doc = "Bits 3:7 - Internal High Speed clock trimming" ]
pub fn hsitrim(&mut self) -> _HsitrimW {
_HsitrimW { register: self }
}
# [ doc = "Bit 16 - External High Speed clock enable" ]
pub fn hseon(&mut self) -> _HseonW {
_HseonW { register: self }
}
# [ doc = "Bit 18 - External High Speed clock Bypass" ]
pub fn hsebyp(&mut self) -> _HsebypW {
_HsebypW { register: self }
}
# [ doc = "Bit 19 - Clock Security System enable" ]
pub fn csson(&mut self) -> _CssonW {
_CssonW { register: self }
}
# [ doc = "Bit 24 - PLL enable" ]
pub fn pllon(&mut self) -> _PllonW {
_PllonW { register: self }
}
}
}
# [ doc = "Clock configuration register (RCC_CFGR)" ]
# [ repr ( C ) ]
pub struct Cfgr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock configuration register (RCC_CFGR)" ]
pub mod cfgr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cfgr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field SW" ]
pub struct SwR {
bits: u8,
}
impl SwR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SWS" ]
pub struct SwsR {
bits: u8,
}
impl SwsR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HPRE" ]
pub struct HpreR {
bits: u8,
}
impl HpreR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PPRE" ]
pub struct PpreR {
bits: u8,
}
impl PpreR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field ADCPRE" ]
pub struct AdcpreR {
bits: u8,
}
impl AdcpreR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLSRC" ]
pub struct PllsrcR {
bits: u8,
}
impl PllsrcR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLXTPRE" ]
pub struct PllxtpreR {
bits: u8,
}
impl PllxtpreR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLMUL" ]
pub struct PllmulR {
bits: u8,
}
impl PllmulR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field MCO" ]
pub struct McoR {
bits: u8,
}
impl McoR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field MCOPRE" ]
pub struct McopreR {
bits: u8,
}
impl McopreR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLNODIV" ]
pub struct PllnodivR {
bits: u8,
}
impl PllnodivR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _SwW<'a> {
register: &'a mut W,
}
impl<'a> _SwW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HpreW<'a> {
register: &'a mut W,
}
impl<'a> _HpreW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 4;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PpreW<'a> {
register: &'a mut W,
}
impl<'a> _PpreW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 7;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _AdcpreW<'a> {
register: &'a mut W,
}
impl<'a> _AdcpreW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllsrcW<'a> {
register: &'a mut W,
}
impl<'a> _PllsrcW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 15;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllxtpreW<'a> {
register: &'a mut W,
}
impl<'a> _PllxtpreW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllmulW<'a> {
register: &'a mut W,
}
impl<'a> _PllmulW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _McoW<'a> {
register: &'a mut W,
}
impl<'a> _McoW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 7;
const OFFSET: u8 = 24;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _McopreW<'a> {
register: &'a mut W,
}
impl<'a> _McopreW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 7;
const OFFSET: u8 = 28;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllnodivW<'a> {
register: &'a mut W,
}
impl<'a> _PllnodivW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 31;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _sw(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 0:1 - System clock Switch" ]
pub fn sw(&self) -> SwR {
SwR { bits: self._sw() }
}
fn _sws(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 2:3 - System Clock Switch Status" ]
pub fn sws(&self) -> SwsR {
SwsR { bits: self._sws() }
}
fn _hpre(&self) -> u8 {
const MASK: u8 = 15;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 4:7 - AHB prescaler" ]
pub fn hpre(&self) -> HpreR {
HpreR { bits: self._hpre() }
}
fn _ppre(&self) -> u8 {
const MASK: u8 = 7;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 8:10 - APB Low speed prescaler (APB1)" ]
pub fn ppre(&self) -> PpreR {
PpreR { bits: self._ppre() }
}
fn _adcpre(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - ADC prescaler" ]
pub fn adcpre(&self) -> AdcpreR {
AdcpreR { bits: self._adcpre() }
}
fn _pllsrc(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 15;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 15:16 - PLL input clock source" ]
pub fn pllsrc(&self) -> PllsrcR {
PllsrcR { bits: self._pllsrc() }
}
fn _pllxtpre(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - HSE divider for PLL entry" ]
pub fn pllxtpre(&self) -> PllxtpreR {
PllxtpreR { bits: self._pllxtpre() }
}
fn _pllmul(&self) -> u8 {
const MASK: u8 = 15;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 18:21 - PLL Multiplication Factor" ]
pub fn pllmul(&self) -> PllmulR {
PllmulR { bits: self._pllmul() }
}
fn _mco(&self) -> u8 {
const MASK: u8 = 7;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 24:26 - Microcontroller clock output" ]
pub fn mco(&self) -> McoR {
McoR { bits: self._mco() }
}
fn _mcopre(&self) -> u8 {
const MASK: u8 = 7;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 28:30 - Microcontroller Clock Output Prescaler" ]
pub fn mcopre(&self) -> McopreR {
McopreR { bits: self._mcopre() }
}
fn _pllnodiv(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 31;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 31 - PLL clock not divided for MCO" ]
pub fn pllnodiv(&self) -> PllnodivR {
PllnodivR { bits: self._pllnodiv() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bits 0:1 - System clock Switch" ]
pub fn sw(&mut self) -> _SwW {
_SwW { register: self }
}
# [ doc = "Bits 4:7 - AHB prescaler" ]
pub fn hpre(&mut self) -> _HpreW {
_HpreW { register: self }
}
# [ doc = "Bits 8:10 - APB Low speed prescaler (APB1)" ]
pub fn ppre(&mut self) -> _PpreW {
_PpreW { register: self }
}
# [ doc = "Bit 14 - ADC prescaler" ]
pub fn adcpre(&mut self) -> _AdcpreW {
_AdcpreW { register: self }
}
# [ doc = "Bits 15:16 - PLL input clock source" ]
pub fn pllsrc(&mut self) -> _PllsrcW {
_PllsrcW { register: self }
}
# [ doc = "Bit 17 - HSE divider for PLL entry" ]
pub fn pllxtpre(&mut self) -> _PllxtpreW {
_PllxtpreW { register: self }
}
# [ doc = "Bits 18:21 - PLL Multiplication Factor" ]
pub fn pllmul(&mut self) -> _PllmulW {
_PllmulW { register: self }
}
# [ doc = "Bits 24:26 - Microcontroller clock output" ]
pub fn mco(&mut self) -> _McoW {
_McoW { register: self }
}
# [ doc = "Bits 28:30 - Microcontroller Clock Output Prescaler" ]
pub fn mcopre(&mut self) -> _McopreW {
_McopreW { register: self }
}
# [ doc = "Bit 31 - PLL clock not divided for MCO" ]
pub fn pllnodiv(&mut self) -> _PllnodivW {
_PllnodivW { register: self }
}
}
}
# [ doc = "Clock interrupt register (RCC_CIR)" ]
# [ repr ( C ) ]
pub struct Cir {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock interrupt register (RCC_CIR)" ]
pub mod cir {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cir {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field LSIRDYF" ]
pub struct LsirdyfR {
bits: u8,
}
impl LsirdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSERDYF" ]
pub struct LserdyfR {
bits: u8,
}
impl LserdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSIRDYF" ]
pub struct HsirdyfR {
bits: u8,
}
impl HsirdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSERDYF" ]
pub struct HserdyfR {
bits: u8,
}
impl HserdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLRDYF" ]
pub struct PllrdyfR {
bits: u8,
}
impl PllrdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14RDYF" ]
pub struct Hsi14rdyfR {
bits: u8,
}
impl Hsi14rdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI48RDYF" ]
pub struct Hsi48rdyfR {
bits: u8,
}
impl Hsi48rdyfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CSSF" ]
pub struct CssfR {
bits: u8,
}
impl CssfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSIRDYIE" ]
pub struct LsirdyieR {
bits: u8,
}
impl LsirdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSERDYIE" ]
pub struct LserdyieR {
bits: u8,
}
impl LserdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSIRDYIE" ]
pub struct HsirdyieR {
bits: u8,
}
impl HsirdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSERDYIE" ]
pub struct HserdyieR {
bits: u8,
}
impl HserdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PLLRDYIE" ]
pub struct PllrdyieR {
bits: u8,
}
impl PllrdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14RDYE" ]
pub struct Hsi14rdyeR {
bits: u8,
}
impl Hsi14rdyeR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI48RDYIE" ]
pub struct Hsi48rdyieR {
bits: u8,
}
impl Hsi48rdyieR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _LsirdyieW<'a> {
register: &'a mut W,
}
impl<'a> _LsirdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LserdyieW<'a> {
register: &'a mut W,
}
impl<'a> _LserdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HsirdyieW<'a> {
register: &'a mut W,
}
impl<'a> _HsirdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 10;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HserdyieW<'a> {
register: &'a mut W,
}
impl<'a> _HserdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllrdyieW<'a> {
register: &'a mut W,
}
impl<'a> _PllrdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi14rdyeW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi14rdyeW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 13;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi48rdyieW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi48rdyieW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LsirdycW<'a> {
register: &'a mut W,
}
impl<'a> _LsirdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LserdycW<'a> {
register: &'a mut W,
}
impl<'a> _LserdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HsirdycW<'a> {
register: &'a mut W,
}
impl<'a> _HsirdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _HserdycW<'a> {
register: &'a mut W,
}
impl<'a> _HserdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PllrdycW<'a> {
register: &'a mut W,
}
impl<'a> _PllrdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 20;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi14rdycW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi14rdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 21;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi48rdycW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi48rdycW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CsscW<'a> {
register: &'a mut W,
}
impl<'a> _CsscW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 23;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _lsirdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - LSI Ready Interrupt flag" ]
pub fn lsirdyf(&self) -> LsirdyfR {
LsirdyfR { bits: self._lsirdyf() }
}
fn _lserdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - LSE Ready Interrupt flag" ]
pub fn lserdyf(&self) -> LserdyfR {
LserdyfR { bits: self._lserdyf() }
}
fn _hsirdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 2 - HSI Ready Interrupt flag" ]
pub fn hsirdyf(&self) -> HsirdyfR {
HsirdyfR { bits: self._hsirdyf() }
}
fn _hserdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 3 - HSE Ready Interrupt flag" ]
pub fn hserdyf(&self) -> HserdyfR {
HserdyfR { bits: self._hserdyf() }
}
fn _pllrdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 4 - PLL Ready Interrupt flag" ]
pub fn pllrdyf(&self) -> PllrdyfR {
PllrdyfR { bits: self._pllrdyf() }
}
fn _hsi14rdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 5;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 5 - HSI14 ready interrupt flag" ]
pub fn hsi14rdyf(&self) -> Hsi14rdyfR {
Hsi14rdyfR { bits: self._hsi14rdyf() }
}
fn _hsi48rdyf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 6 - HSI48 ready interrupt flag" ]
pub fn hsi48rdyf(&self) -> Hsi48rdyfR {
Hsi48rdyfR { bits: self._hsi48rdyf() }
}
fn _cssf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 7;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 7 - Clock Security System Interrupt flag" ]
pub fn cssf(&self) -> CssfR {
CssfR { bits: self._cssf() }
}
fn _lsirdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 8 - LSI Ready Interrupt Enable" ]
pub fn lsirdyie(&self) -> LsirdyieR {
LsirdyieR { bits: self._lsirdyie() }
}
fn _lserdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 9 - LSE Ready Interrupt Enable" ]
pub fn lserdyie(&self) -> LserdyieR {
LserdyieR { bits: self._lserdyie() }
}
fn _hsirdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 10 - HSI Ready Interrupt Enable" ]
pub fn hsirdyie(&self) -> HsirdyieR {
HsirdyieR { bits: self._hsirdyie() }
}
fn _hserdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 11 - HSE Ready Interrupt Enable" ]
pub fn hserdyie(&self) -> HserdyieR {
HserdyieR { bits: self._hserdyie() }
}
fn _pllrdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 12 - PLL Ready Interrupt Enable" ]
pub fn pllrdyie(&self) -> PllrdyieR {
PllrdyieR { bits: self._pllrdyie() }
}
fn _hsi14rdye(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 13;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 13 - HSI14 ready interrupt enable" ]
pub fn hsi14rdye(&self) -> Hsi14rdyeR {
Hsi14rdyeR { bits: self._hsi14rdye() }
}
fn _hsi48rdyie(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - HSI48 ready interrupt enable" ]
pub fn hsi48rdyie(&self) -> Hsi48rdyieR {
Hsi48rdyieR { bits: self._hsi48rdyie() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 8 - LSI Ready Interrupt Enable" ]
pub fn lsirdyie(&mut self) -> _LsirdyieW {
_LsirdyieW { register: self }
}
# [ doc = "Bit 9 - LSE Ready Interrupt Enable" ]
pub fn lserdyie(&mut self) -> _LserdyieW {
_LserdyieW { register: self }
}
# [ doc = "Bit 10 - HSI Ready Interrupt Enable" ]
pub fn hsirdyie(&mut self) -> _HsirdyieW {
_HsirdyieW { register: self }
}
# [ doc = "Bit 11 - HSE Ready Interrupt Enable" ]
pub fn hserdyie(&mut self) -> _HserdyieW {
_HserdyieW { register: self }
}
# [ doc = "Bit 12 - PLL Ready Interrupt Enable" ]
pub fn pllrdyie(&mut self) -> _PllrdyieW {
_PllrdyieW { register: self }
}
# [ doc = "Bit 13 - HSI14 ready interrupt enable" ]
pub fn hsi14rdye(&mut self) -> _Hsi14rdyeW {
_Hsi14rdyeW { register: self }
}
# [ doc = "Bit 14 - HSI48 ready interrupt enable" ]
pub fn hsi48rdyie(&mut self) -> _Hsi48rdyieW {
_Hsi48rdyieW { register: self }
}
# [ doc = "Bit 16 - LSI Ready Interrupt Clear" ]
pub fn lsirdyc(&mut self) -> _LsirdycW {
_LsirdycW { register: self }
}
# [ doc = "Bit 17 - LSE Ready Interrupt Clear" ]
pub fn lserdyc(&mut self) -> _LserdycW {
_LserdycW { register: self }
}
# [ doc = "Bit 18 - HSI Ready Interrupt Clear" ]
pub fn hsirdyc(&mut self) -> _HsirdycW {
_HsirdycW { register: self }
}
# [ doc = "Bit 19 - HSE Ready Interrupt Clear" ]
pub fn hserdyc(&mut self) -> _HserdycW {
_HserdycW { register: self }
}
# [ doc = "Bit 20 - PLL Ready Interrupt Clear" ]
pub fn pllrdyc(&mut self) -> _PllrdycW {
_PllrdycW { register: self }
}
# [ doc = "Bit 21 - HSI 14 MHz Ready Interrupt Clear" ]
pub fn hsi14rdyc(&mut self) -> _Hsi14rdycW {
_Hsi14rdycW { register: self }
}
# [ doc = "Bit 22 - HSI48 Ready Interrupt Clear" ]
pub fn hsi48rdyc(&mut self) -> _Hsi48rdycW {
_Hsi48rdycW { register: self }
}
# [ doc = "Bit 23 - Clock security system interrupt clear" ]
pub fn cssc(&mut self) -> _CsscW {
_CsscW { register: self }
}
}
}
# [ doc = "APB2 peripheral reset register (RCC_APB2RSTR)" ]
# [ repr ( C ) ]
pub struct Apb2rstr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "APB2 peripheral reset register (RCC_APB2RSTR)" ]
pub mod apb2rstr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Apb2rstr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field SYSCFGRST" ]
pub struct SyscfgrstR {
bits: u8,
}
impl SyscfgrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field ADCRST" ]
pub struct AdcrstR {
bits: u8,
}
impl AdcrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM1RST" ]
pub struct Tim1rstR {
bits: u8,
}
impl Tim1rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SPI1RST" ]
pub struct Spi1rstR {
bits: u8,
}
impl Spi1rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART1RST" ]
pub struct Usart1rstR {
bits: u8,
}
impl Usart1rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM15RST" ]
pub struct Tim15rstR {
bits: u8,
}
impl Tim15rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM16RST" ]
pub struct Tim16rstR {
bits: u8,
}
impl Tim16rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM17RST" ]
pub struct Tim17rstR {
bits: u8,
}
impl Tim17rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field DBGMCURST" ]
pub struct DbgmcurstR {
bits: u8,
}
impl DbgmcurstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _SyscfgrstW<'a> {
register: &'a mut W,
}
impl<'a> _SyscfgrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _AdcrstW<'a> {
register: &'a mut W,
}
impl<'a> _AdcrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim1rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim1rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Spi1rstW<'a> {
register: &'a mut W,
}
impl<'a> _Spi1rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart1rstW<'a> {
register: &'a mut W,
}
impl<'a> _Usart1rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim15rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim15rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim16rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim16rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim17rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim17rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _DbgmcurstW<'a> {
register: &'a mut W,
}
impl<'a> _DbgmcurstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _syscfgrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - SYSCFG and COMP reset" ]
pub fn syscfgrst(&self) -> SyscfgrstR {
SyscfgrstR { bits: self._syscfgrst() }
}
fn _adcrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 9 - ADC interface reset" ]
pub fn adcrst(&self) -> AdcrstR {
AdcrstR { bits: self._adcrst() }
}
fn _tim1rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 11 - TIM1 timer reset" ]
pub fn tim1rst(&self) -> Tim1rstR {
Tim1rstR { bits: self._tim1rst() }
}
fn _spi1rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 12 - SPI 1 reset" ]
pub fn spi1rst(&self) -> Spi1rstR {
Spi1rstR { bits: self._spi1rst() }
}
fn _usart1rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - USART1 reset" ]
pub fn usart1rst(&self) -> Usart1rstR {
Usart1rstR { bits: self._usart1rst() }
}
fn _tim15rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 16 - TIM15 timer reset" ]
pub fn tim15rst(&self) -> Tim15rstR {
Tim15rstR { bits: self._tim15rst() }
}
fn _tim16rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - TIM16 timer reset" ]
pub fn tim16rst(&self) -> Tim16rstR {
Tim16rstR { bits: self._tim16rst() }
}
fn _tim17rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - TIM17 timer reset" ]
pub fn tim17rst(&self) -> Tim17rstR {
Tim17rstR { bits: self._tim17rst() }
}
fn _dbgmcurst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - Debug MCU reset" ]
pub fn dbgmcurst(&self) -> DbgmcurstR {
DbgmcurstR { bits: self._dbgmcurst() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - SYSCFG and COMP reset" ]
pub fn syscfgrst(&mut self) -> _SyscfgrstW {
_SyscfgrstW { register: self }
}
# [ doc = "Bit 9 - ADC interface reset" ]
pub fn adcrst(&mut self) -> _AdcrstW {
_AdcrstW { register: self }
}
# [ doc = "Bit 11 - TIM1 timer reset" ]
pub fn tim1rst(&mut self) -> _Tim1rstW {
_Tim1rstW { register: self }
}
# [ doc = "Bit 12 - SPI 1 reset" ]
pub fn spi1rst(&mut self) -> _Spi1rstW {
_Spi1rstW { register: self }
}
# [ doc = "Bit 14 - USART1 reset" ]
pub fn usart1rst(&mut self) -> _Usart1rstW {
_Usart1rstW { register: self }
}
# [ doc = "Bit 16 - TIM15 timer reset" ]
pub fn tim15rst(&mut self) -> _Tim15rstW {
_Tim15rstW { register: self }
}
# [ doc = "Bit 17 - TIM16 timer reset" ]
pub fn tim16rst(&mut self) -> _Tim16rstW {
_Tim16rstW { register: self }
}
# [ doc = "Bit 18 - TIM17 timer reset" ]
pub fn tim17rst(&mut self) -> _Tim17rstW {
_Tim17rstW { register: self }
}
# [ doc = "Bit 22 - Debug MCU reset" ]
pub fn dbgmcurst(&mut self) -> _DbgmcurstW {
_DbgmcurstW { register: self }
}
}
}
# [ doc = "APB1 peripheral reset register (RCC_APB1RSTR)" ]
# [ repr ( C ) ]
pub struct Apb1rstr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "APB1 peripheral reset register (RCC_APB1RSTR)" ]
pub mod apb1rstr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Apb1rstr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field TIM2RST" ]
pub struct Tim2rstR {
bits: u8,
}
impl Tim2rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM3RST" ]
pub struct Tim3rstR {
bits: u8,
}
impl Tim3rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM6RST" ]
pub struct Tim6rstR {
bits: u8,
}
impl Tim6rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM7RST" ]
pub struct Tim7rstR {
bits: u8,
}
impl Tim7rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM14RST" ]
pub struct Tim14rstR {
bits: u8,
}
impl Tim14rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field WWDGRST" ]
pub struct WwdgrstR {
bits: u8,
}
impl WwdgrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SPI2RST" ]
pub struct Spi2rstR {
bits: u8,
}
impl Spi2rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART2RST" ]
pub struct Usart2rstR {
bits: u8,
}
impl Usart2rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART3RST" ]
pub struct Usart3rstR {
bits: u8,
}
impl Usart3rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART4RST" ]
pub struct Usart4rstR {
bits: u8,
}
impl Usart4rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field I2C1RST" ]
pub struct I2c1rstR {
bits: u8,
}
impl I2c1rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field I2C2RST" ]
pub struct I2c2rstR {
bits: u8,
}
impl I2c2rstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USBRST" ]
pub struct UsbrstR {
bits: u8,
}
impl UsbrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CANRST" ]
pub struct CanrstR {
bits: u8,
}
impl CanrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CRSRST" ]
pub struct CrsrstR {
bits: u8,
}
impl CrsrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PWRRST" ]
pub struct PwrrstR {
bits: u8,
}
impl PwrrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field DACRST" ]
pub struct DacrstR {
bits: u8,
}
impl DacrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CECRST" ]
pub struct CecrstR {
bits: u8,
}
impl CecrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _Tim2rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim2rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim3rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim3rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim6rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim6rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim7rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim7rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 5;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim14rstW<'a> {
register: &'a mut W,
}
impl<'a> _Tim14rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _WwdgrstW<'a> {
register: &'a mut W,
}
impl<'a> _WwdgrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Spi2rstW<'a> {
register: &'a mut W,
}
impl<'a> _Spi2rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart2rstW<'a> {
register: &'a mut W,
}
impl<'a> _Usart2rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart3rstW<'a> {
register: &'a mut W,
}
impl<'a> _Usart3rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart4rstW<'a> {
register: &'a mut W,
}
impl<'a> _Usart4rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _I2c1rstW<'a> {
register: &'a mut W,
}
impl<'a> _I2c1rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 21;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _I2c2rstW<'a> {
register: &'a mut W,
}
impl<'a> _I2c2rstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _UsbrstW<'a> {
register: &'a mut W,
}
impl<'a> _UsbrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 23;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CanrstW<'a> {
register: &'a mut W,
}
impl<'a> _CanrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CrsrstW<'a> {
register: &'a mut W,
}
impl<'a> _CrsrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PwrrstW<'a> {
register: &'a mut W,
}
impl<'a> _PwrrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _DacrstW<'a> {
register: &'a mut W,
}
impl<'a> _DacrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CecrstW<'a> {
register: &'a mut W,
}
impl<'a> _CecrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _tim2rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - Timer 2 reset" ]
pub fn tim2rst(&self) -> Tim2rstR {
Tim2rstR { bits: self._tim2rst() }
}
fn _tim3rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - Timer 3 reset" ]
pub fn tim3rst(&self) -> Tim3rstR {
Tim3rstR { bits: self._tim3rst() }
}
fn _tim6rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 4 - Timer 6 reset" ]
pub fn tim6rst(&self) -> Tim6rstR {
Tim6rstR { bits: self._tim6rst() }
}
fn _tim7rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 5;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 5 - TIM7 timer reset" ]
pub fn tim7rst(&self) -> Tim7rstR {
Tim7rstR { bits: self._tim7rst() }
}
fn _tim14rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 8 - Timer 14 reset" ]
pub fn tim14rst(&self) -> Tim14rstR {
Tim14rstR { bits: self._tim14rst() }
}
fn _wwdgrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 11 - Window watchdog reset" ]
pub fn wwdgrst(&self) -> WwdgrstR {
WwdgrstR { bits: self._wwdgrst() }
}
fn _spi2rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - SPI2 reset" ]
pub fn spi2rst(&self) -> Spi2rstR {
Spi2rstR { bits: self._spi2rst() }
}
fn _usart2rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - USART 2 reset" ]
pub fn usart2rst(&self) -> Usart2rstR {
Usart2rstR { bits: self._usart2rst() }
}
fn _usart3rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - USART3 reset" ]
pub fn usart3rst(&self) -> Usart3rstR {
Usart3rstR { bits: self._usart3rst() }
}
fn _usart4rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 19 - USART4 reset" ]
pub fn usart4rst(&self) -> Usart4rstR {
Usart4rstR { bits: self._usart4rst() }
}
fn _i2c1rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 21 - I2C1 reset" ]
pub fn i2c1rst(&self) -> I2c1rstR {
I2c1rstR { bits: self._i2c1rst() }
}
fn _i2c2rst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - I2C2 reset" ]
pub fn i2c2rst(&self) -> I2c2rstR {
I2c2rstR { bits: self._i2c2rst() }
}
fn _usbrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 23;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 23 - USB interface reset" ]
pub fn usbrst(&self) -> UsbrstR {
UsbrstR { bits: self._usbrst() }
}
fn _canrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 25 - CAN interface reset" ]
pub fn canrst(&self) -> CanrstR {
CanrstR { bits: self._canrst() }
}
fn _crsrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 27 - Clock Recovery System interface reset" ]
pub fn crsrst(&self) -> CrsrstR {
CrsrstR { bits: self._crsrst() }
}
fn _pwrrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 28 - Power interface reset" ]
pub fn pwrrst(&self) -> PwrrstR {
PwrrstR { bits: self._pwrrst() }
}
fn _dacrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 29 - DAC interface reset" ]
pub fn dacrst(&self) -> DacrstR {
DacrstR { bits: self._dacrst() }
}
fn _cecrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 30 - HDMI CEC reset" ]
pub fn cecrst(&self) -> CecrstR {
CecrstR { bits: self._cecrst() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - Timer 2 reset" ]
pub fn tim2rst(&mut self) -> _Tim2rstW {
_Tim2rstW { register: self }
}
# [ doc = "Bit 1 - Timer 3 reset" ]
pub fn tim3rst(&mut self) -> _Tim3rstW {
_Tim3rstW { register: self }
}
# [ doc = "Bit 4 - Timer 6 reset" ]
pub fn tim6rst(&mut self) -> _Tim6rstW {
_Tim6rstW { register: self }
}
# [ doc = "Bit 5 - TIM7 timer reset" ]
pub fn tim7rst(&mut self) -> _Tim7rstW {
_Tim7rstW { register: self }
}
# [ doc = "Bit 8 - Timer 14 reset" ]
pub fn tim14rst(&mut self) -> _Tim14rstW {
_Tim14rstW { register: self }
}
# [ doc = "Bit 11 - Window watchdog reset" ]
pub fn wwdgrst(&mut self) -> _WwdgrstW {
_WwdgrstW { register: self }
}
# [ doc = "Bit 14 - SPI2 reset" ]
pub fn spi2rst(&mut self) -> _Spi2rstW {
_Spi2rstW { register: self }
}
# [ doc = "Bit 17 - USART 2 reset" ]
pub fn usart2rst(&mut self) -> _Usart2rstW {
_Usart2rstW { register: self }
}
# [ doc = "Bit 18 - USART3 reset" ]
pub fn usart3rst(&mut self) -> _Usart3rstW {
_Usart3rstW { register: self }
}
# [ doc = "Bit 19 - USART4 reset" ]
pub fn usart4rst(&mut self) -> _Usart4rstW {
_Usart4rstW { register: self }
}
# [ doc = "Bit 21 - I2C1 reset" ]
pub fn i2c1rst(&mut self) -> _I2c1rstW {
_I2c1rstW { register: self }
}
# [ doc = "Bit 22 - I2C2 reset" ]
pub fn i2c2rst(&mut self) -> _I2c2rstW {
_I2c2rstW { register: self }
}
# [ doc = "Bit 23 - USB interface reset" ]
pub fn usbrst(&mut self) -> _UsbrstW {
_UsbrstW { register: self }
}
# [ doc = "Bit 25 - CAN interface reset" ]
pub fn canrst(&mut self) -> _CanrstW {
_CanrstW { register: self }
}
# [ doc = "Bit 27 - Clock Recovery System interface reset" ]
pub fn crsrst(&mut self) -> _CrsrstW {
_CrsrstW { register: self }
}
# [ doc = "Bit 28 - Power interface reset" ]
pub fn pwrrst(&mut self) -> _PwrrstW {
_PwrrstW { register: self }
}
# [ doc = "Bit 29 - DAC interface reset" ]
pub fn dacrst(&mut self) -> _DacrstW {
_DacrstW { register: self }
}
# [ doc = "Bit 30 - HDMI CEC reset" ]
pub fn cecrst(&mut self) -> _CecrstW {
_CecrstW { register: self }
}
}
}
# [ doc = "AHB Peripheral Clock enable register (RCC_AHBENR)" ]
# [ repr ( C ) ]
pub struct Ahbenr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "AHB Peripheral Clock enable register (RCC_AHBENR)" ]
pub mod ahbenr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Ahbenr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field DMAEN" ]
pub struct DmaenR {
bits: u8,
}
impl DmaenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SRAMEN" ]
pub struct SramenR {
bits: u8,
}
impl SramenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field FLITFEN" ]
pub struct FlitfenR {
bits: u8,
}
impl FlitfenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CRCEN" ]
pub struct CrcenR {
bits: u8,
}
impl CrcenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPAEN" ]
pub struct IopaenR {
bits: u8,
}
impl IopaenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPBEN" ]
pub struct IopbenR {
bits: u8,
}
impl IopbenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPCEN" ]
pub struct IopcenR {
bits: u8,
}
impl IopcenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPDEN" ]
pub struct IopdenR {
bits: u8,
}
impl IopdenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPFEN" ]
pub struct IopfenR {
bits: u8,
}
impl IopfenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TSCEN" ]
pub struct TscenR {
bits: u8,
}
impl TscenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _DmaenW<'a> {
register: &'a mut W,
}
impl<'a> _DmaenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _SramenW<'a> {
register: &'a mut W,
}
impl<'a> _SramenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _FlitfenW<'a> {
register: &'a mut W,
}
impl<'a> _FlitfenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CrcenW<'a> {
register: &'a mut W,
}
impl<'a> _CrcenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 6;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopaenW<'a> {
register: &'a mut W,
}
impl<'a> _IopaenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopbenW<'a> {
register: &'a mut W,
}
impl<'a> _IopbenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopcenW<'a> {
register: &'a mut W,
}
impl<'a> _IopcenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopdenW<'a> {
register: &'a mut W,
}
impl<'a> _IopdenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 20;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopfenW<'a> {
register: &'a mut W,
}
impl<'a> _IopfenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _TscenW<'a> {
register: &'a mut W,
}
impl<'a> _TscenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _dmaen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - DMA1 clock enable" ]
pub fn dmaen(&self) -> DmaenR {
DmaenR { bits: self._dmaen() }
}
fn _sramen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 2 - SRAM interface clock enable" ]
pub fn sramen(&self) -> SramenR {
SramenR { bits: self._sramen() }
}
fn _flitfen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 4 - FLITF clock enable" ]
pub fn flitfen(&self) -> FlitfenR {
FlitfenR { bits: self._flitfen() }
}
fn _crcen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 6 - CRC clock enable" ]
pub fn crcen(&self) -> CrcenR {
CrcenR { bits: self._crcen() }
}
fn _iopaen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - I/O port A clock enable" ]
pub fn iopaen(&self) -> IopaenR {
IopaenR { bits: self._iopaen() }
}
fn _iopben(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - I/O port B clock enable" ]
pub fn iopben(&self) -> IopbenR {
IopbenR { bits: self._iopben() }
}
fn _iopcen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 19 - I/O port C clock enable" ]
pub fn iopcen(&self) -> IopcenR {
IopcenR { bits: self._iopcen() }
}
fn _iopden(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 20 - I/O port D clock enable" ]
pub fn iopden(&self) -> IopdenR {
IopdenR { bits: self._iopden() }
}
fn _iopfen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - I/O port F clock enable" ]
pub fn iopfen(&self) -> IopfenR {
IopfenR { bits: self._iopfen() }
}
fn _tscen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 24 - Touch sensing controller clock enable" ]
pub fn tscen(&self) -> TscenR {
TscenR { bits: self._tscen() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 20 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - DMA1 clock enable" ]
pub fn dmaen(&mut self) -> _DmaenW {
_DmaenW { register: self }
}
# [ doc = "Bit 2 - SRAM interface clock enable" ]
pub fn sramen(&mut self) -> _SramenW {
_SramenW { register: self }
}
# [ doc = "Bit 4 - FLITF clock enable" ]
pub fn flitfen(&mut self) -> _FlitfenW {
_FlitfenW { register: self }
}
# [ doc = "Bit 6 - CRC clock enable" ]
pub fn crcen(&mut self) -> _CrcenW {
_CrcenW { register: self }
}
# [ doc = "Bit 17 - I/O port A clock enable" ]
pub fn iopaen(&mut self) -> _IopaenW {
_IopaenW { register: self }
}
# [ doc = "Bit 18 - I/O port B clock enable" ]
pub fn iopben(&mut self) -> _IopbenW {
_IopbenW { register: self }
}
# [ doc = "Bit 19 - I/O port C clock enable" ]
pub fn iopcen(&mut self) -> _IopcenW {
_IopcenW { register: self }
}
# [ doc = "Bit 20 - I/O port D clock enable" ]
pub fn iopden(&mut self) -> _IopdenW {
_IopdenW { register: self }
}
# [ doc = "Bit 22 - I/O port F clock enable" ]
pub fn iopfen(&mut self) -> _IopfenW {
_IopfenW { register: self }
}
# [ doc = "Bit 24 - Touch sensing controller clock enable" ]
pub fn tscen(&mut self) -> _TscenW {
_TscenW { register: self }
}
}
}
# [ doc = "APB2 peripheral clock enable register (RCC_APB2ENR)" ]
# [ repr ( C ) ]
pub struct Apb2enr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "APB2 peripheral clock enable register (RCC_APB2ENR)" ]
pub mod apb2enr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Apb2enr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field SYSCFGEN" ]
pub struct SyscfgenR {
bits: u8,
}
impl SyscfgenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field ADCEN" ]
pub struct AdcenR {
bits: u8,
}
impl AdcenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM1EN" ]
pub struct Tim1enR {
bits: u8,
}
impl Tim1enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SPI1EN" ]
pub struct Spi1enR {
bits: u8,
}
impl Spi1enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART1EN" ]
pub struct Usart1enR {
bits: u8,
}
impl Usart1enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM15EN" ]
pub struct Tim15enR {
bits: u8,
}
impl Tim15enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM16EN" ]
pub struct Tim16enR {
bits: u8,
}
impl Tim16enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM17EN" ]
pub struct Tim17enR {
bits: u8,
}
impl Tim17enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field DBGMCUEN" ]
pub struct DbgmcuenR {
bits: u8,
}
impl DbgmcuenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _SyscfgenW<'a> {
register: &'a mut W,
}
impl<'a> _SyscfgenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _AdcenW<'a> {
register: &'a mut W,
}
impl<'a> _AdcenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim1enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim1enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Spi1enW<'a> {
register: &'a mut W,
}
impl<'a> _Spi1enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart1enW<'a> {
register: &'a mut W,
}
impl<'a> _Usart1enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim15enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim15enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim16enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim16enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim17enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim17enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _DbgmcuenW<'a> {
register: &'a mut W,
}
impl<'a> _DbgmcuenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _syscfgen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - SYSCFG clock enable" ]
pub fn syscfgen(&self) -> SyscfgenR {
SyscfgenR { bits: self._syscfgen() }
}
fn _adcen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 9 - ADC 1 interface clock enable" ]
pub fn adcen(&self) -> AdcenR {
AdcenR { bits: self._adcen() }
}
fn _tim1en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 11 - TIM1 Timer clock enable" ]
pub fn tim1en(&self) -> Tim1enR {
Tim1enR { bits: self._tim1en() }
}
fn _spi1en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 12 - SPI 1 clock enable" ]
pub fn spi1en(&self) -> Spi1enR {
Spi1enR { bits: self._spi1en() }
}
fn _usart1en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - USART1 clock enable" ]
pub fn usart1en(&self) -> Usart1enR {
Usart1enR { bits: self._usart1en() }
}
fn _tim15en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 16 - TIM15 timer clock enable" ]
pub fn tim15en(&self) -> Tim15enR {
Tim15enR { bits: self._tim15en() }
}
fn _tim16en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - TIM16 timer clock enable" ]
pub fn tim16en(&self) -> Tim16enR {
Tim16enR { bits: self._tim16en() }
}
fn _tim17en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - TIM17 timer clock enable" ]
pub fn tim17en(&self) -> Tim17enR {
Tim17enR { bits: self._tim17en() }
}
fn _dbgmcuen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - MCU debug module clock enable" ]
pub fn dbgmcuen(&self) -> DbgmcuenR {
DbgmcuenR { bits: self._dbgmcuen() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - SYSCFG clock enable" ]
pub fn syscfgen(&mut self) -> _SyscfgenW {
_SyscfgenW { register: self }
}
# [ doc = "Bit 9 - ADC 1 interface clock enable" ]
pub fn adcen(&mut self) -> _AdcenW {
_AdcenW { register: self }
}
# [ doc = "Bit 11 - TIM1 Timer clock enable" ]
pub fn tim1en(&mut self) -> _Tim1enW {
_Tim1enW { register: self }
}
# [ doc = "Bit 12 - SPI 1 clock enable" ]
pub fn spi1en(&mut self) -> _Spi1enW {
_Spi1enW { register: self }
}
# [ doc = "Bit 14 - USART1 clock enable" ]
pub fn usart1en(&mut self) -> _Usart1enW {
_Usart1enW { register: self }
}
# [ doc = "Bit 16 - TIM15 timer clock enable" ]
pub fn tim15en(&mut self) -> _Tim15enW {
_Tim15enW { register: self }
}
# [ doc = "Bit 17 - TIM16 timer clock enable" ]
pub fn tim16en(&mut self) -> _Tim16enW {
_Tim16enW { register: self }
}
# [ doc = "Bit 18 - TIM17 timer clock enable" ]
pub fn tim17en(&mut self) -> _Tim17enW {
_Tim17enW { register: self }
}
# [ doc = "Bit 22 - MCU debug module clock enable" ]
pub fn dbgmcuen(&mut self) -> _DbgmcuenW {
_DbgmcuenW { register: self }
}
}
}
# [ doc = "APB1 peripheral clock enable register (RCC_APB1ENR)" ]
# [ repr ( C ) ]
pub struct Apb1enr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "APB1 peripheral clock enable register (RCC_APB1ENR)" ]
pub mod apb1enr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Apb1enr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field TIM2EN" ]
pub struct Tim2enR {
bits: u8,
}
impl Tim2enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM3EN" ]
pub struct Tim3enR {
bits: u8,
}
impl Tim3enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM6EN" ]
pub struct Tim6enR {
bits: u8,
}
impl Tim6enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM7EN" ]
pub struct Tim7enR {
bits: u8,
}
impl Tim7enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TIM14EN" ]
pub struct Tim14enR {
bits: u8,
}
impl Tim14enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field WWDGEN" ]
pub struct WwdgenR {
bits: u8,
}
impl WwdgenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SPI2EN" ]
pub struct Spi2enR {
bits: u8,
}
impl Spi2enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART2EN" ]
pub struct Usart2enR {
bits: u8,
}
impl Usart2enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART3EN" ]
pub struct Usart3enR {
bits: u8,
}
impl Usart3enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART4EN" ]
pub struct Usart4enR {
bits: u8,
}
impl Usart4enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field I2C1EN" ]
pub struct I2c1enR {
bits: u8,
}
impl I2c1enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field I2C2EN" ]
pub struct I2c2enR {
bits: u8,
}
impl I2c2enR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USBRST" ]
pub struct UsbrstR {
bits: u8,
}
impl UsbrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CANEN" ]
pub struct CanenR {
bits: u8,
}
impl CanenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CRSEN" ]
pub struct CrsenR {
bits: u8,
}
impl CrsenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PWREN" ]
pub struct PwrenR {
bits: u8,
}
impl PwrenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field DACEN" ]
pub struct DacenR {
bits: u8,
}
impl DacenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CECEN" ]
pub struct CecenR {
bits: u8,
}
impl CecenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _Tim2enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim2enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim3enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim3enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim6enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim6enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim7enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim7enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 5;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Tim14enW<'a> {
register: &'a mut W,
}
impl<'a> _Tim14enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _WwdgenW<'a> {
register: &'a mut W,
}
impl<'a> _WwdgenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Spi2enW<'a> {
register: &'a mut W,
}
impl<'a> _Spi2enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart2enW<'a> {
register: &'a mut W,
}
impl<'a> _Usart2enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart3enW<'a> {
register: &'a mut W,
}
impl<'a> _Usart3enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart4enW<'a> {
register: &'a mut W,
}
impl<'a> _Usart4enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _I2c1enW<'a> {
register: &'a mut W,
}
impl<'a> _I2c1enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 21;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _I2c2enW<'a> {
register: &'a mut W,
}
impl<'a> _I2c2enW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _UsbrstW<'a> {
register: &'a mut W,
}
impl<'a> _UsbrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 23;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CanenW<'a> {
register: &'a mut W,
}
impl<'a> _CanenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CrsenW<'a> {
register: &'a mut W,
}
impl<'a> _CrsenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PwrenW<'a> {
register: &'a mut W,
}
impl<'a> _PwrenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _DacenW<'a> {
register: &'a mut W,
}
impl<'a> _DacenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CecenW<'a> {
register: &'a mut W,
}
impl<'a> _CecenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _tim2en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - Timer 2 clock enable" ]
pub fn tim2en(&self) -> Tim2enR {
Tim2enR { bits: self._tim2en() }
}
fn _tim3en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - Timer 3 clock enable" ]
pub fn tim3en(&self) -> Tim3enR {
Tim3enR { bits: self._tim3en() }
}
fn _tim6en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 4 - Timer 6 clock enable" ]
pub fn tim6en(&self) -> Tim6enR {
Tim6enR { bits: self._tim6en() }
}
fn _tim7en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 5;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 5 - TIM7 timer clock enable" ]
pub fn tim7en(&self) -> Tim7enR {
Tim7enR { bits: self._tim7en() }
}
fn _tim14en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 8 - Timer 14 clock enable" ]
pub fn tim14en(&self) -> Tim14enR {
Tim14enR { bits: self._tim14en() }
}
fn _wwdgen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 11 - Window watchdog clock enable" ]
pub fn wwdgen(&self) -> WwdgenR {
WwdgenR { bits: self._wwdgen() }
}
fn _spi2en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 14 - SPI 2 clock enable" ]
pub fn spi2en(&self) -> Spi2enR {
Spi2enR { bits: self._spi2en() }
}
fn _usart2en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - USART 2 clock enable" ]
pub fn usart2en(&self) -> Usart2enR {
Usart2enR { bits: self._usart2en() }
}
fn _usart3en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - USART3 clock enable" ]
pub fn usart3en(&self) -> Usart3enR {
Usart3enR { bits: self._usart3en() }
}
fn _usart4en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 19 - USART4 clock enable" ]
pub fn usart4en(&self) -> Usart4enR {
Usart4enR { bits: self._usart4en() }
}
fn _i2c1en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 21 - I2C 1 clock enable" ]
pub fn i2c1en(&self) -> I2c1enR {
I2c1enR { bits: self._i2c1en() }
}
fn _i2c2en(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - I2C 2 clock enable" ]
pub fn i2c2en(&self) -> I2c2enR {
I2c2enR { bits: self._i2c2en() }
}
fn _usbrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 23;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 23 - USB interface clock enable" ]
pub fn usbrst(&self) -> UsbrstR {
UsbrstR { bits: self._usbrst() }
}
fn _canen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 25 - CAN interface clock enable" ]
pub fn canen(&self) -> CanenR {
CanenR { bits: self._canen() }
}
fn _crsen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 27 - Clock Recovery System interface clock enable" ]
pub fn crsen(&self) -> CrsenR {
CrsenR { bits: self._crsen() }
}
fn _pwren(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 28 - Power interface clock enable" ]
pub fn pwren(&self) -> PwrenR {
PwrenR { bits: self._pwren() }
}
fn _dacen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 29 - DAC interface clock enable" ]
pub fn dacen(&self) -> DacenR {
DacenR { bits: self._dacen() }
}
fn _cecen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 30 - HDMI CEC interface clock enable" ]
pub fn cecen(&self) -> CecenR {
CecenR { bits: self._cecen() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - Timer 2 clock enable" ]
pub fn tim2en(&mut self) -> _Tim2enW {
_Tim2enW { register: self }
}
# [ doc = "Bit 1 - Timer 3 clock enable" ]
pub fn tim3en(&mut self) -> _Tim3enW {
_Tim3enW { register: self }
}
# [ doc = "Bit 4 - Timer 6 clock enable" ]
pub fn tim6en(&mut self) -> _Tim6enW {
_Tim6enW { register: self }
}
# [ doc = "Bit 5 - TIM7 timer clock enable" ]
pub fn tim7en(&mut self) -> _Tim7enW {
_Tim7enW { register: self }
}
# [ doc = "Bit 8 - Timer 14 clock enable" ]
pub fn tim14en(&mut self) -> _Tim14enW {
_Tim14enW { register: self }
}
# [ doc = "Bit 11 - Window watchdog clock enable" ]
pub fn wwdgen(&mut self) -> _WwdgenW {
_WwdgenW { register: self }
}
# [ doc = "Bit 14 - SPI 2 clock enable" ]
pub fn spi2en(&mut self) -> _Spi2enW {
_Spi2enW { register: self }
}
# [ doc = "Bit 17 - USART 2 clock enable" ]
pub fn usart2en(&mut self) -> _Usart2enW {
_Usart2enW { register: self }
}
# [ doc = "Bit 18 - USART3 clock enable" ]
pub fn usart3en(&mut self) -> _Usart3enW {
_Usart3enW { register: self }
}
# [ doc = "Bit 19 - USART4 clock enable" ]
pub fn usart4en(&mut self) -> _Usart4enW {
_Usart4enW { register: self }
}
# [ doc = "Bit 21 - I2C 1 clock enable" ]
pub fn i2c1en(&mut self) -> _I2c1enW {
_I2c1enW { register: self }
}
# [ doc = "Bit 22 - I2C 2 clock enable" ]
pub fn i2c2en(&mut self) -> _I2c2enW {
_I2c2enW { register: self }
}
# [ doc = "Bit 23 - USB interface clock enable" ]
pub fn usbrst(&mut self) -> _UsbrstW {
_UsbrstW { register: self }
}
# [ doc = "Bit 25 - CAN interface clock enable" ]
pub fn canen(&mut self) -> _CanenW {
_CanenW { register: self }
}
# [ doc = "Bit 27 - Clock Recovery System interface clock enable" ]
pub fn crsen(&mut self) -> _CrsenW {
_CrsenW { register: self }
}
# [ doc = "Bit 28 - Power interface clock enable" ]
pub fn pwren(&mut self) -> _PwrenW {
_PwrenW { register: self }
}
# [ doc = "Bit 29 - DAC interface clock enable" ]
pub fn dacen(&mut self) -> _DacenW {
_DacenW { register: self }
}
# [ doc = "Bit 30 - HDMI CEC interface clock enable" ]
pub fn cecen(&mut self) -> _CecenW {
_CecenW { register: self }
}
}
}
# [ doc = "Backup domain control register (RCC_BDCR)" ]
# [ repr ( C ) ]
pub struct Bdcr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Backup domain control register (RCC_BDCR)" ]
pub mod bdcr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Bdcr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field LSEON" ]
pub struct LseonR {
bits: u8,
}
impl LseonR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSERDY" ]
pub struct LserdyR {
bits: u8,
}
impl LserdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSEBYP" ]
pub struct LsebypR {
bits: u8,
}
impl LsebypR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSEDRV" ]
pub struct LsedrvR {
bits: u8,
}
impl LsedrvR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field RTCSEL" ]
pub struct RtcselR {
bits: u8,
}
impl RtcselR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field RTCEN" ]
pub struct RtcenR {
bits: u8,
}
impl RtcenR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field BDRST" ]
pub struct BdrstR {
bits: u8,
}
impl BdrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _LseonW<'a> {
register: &'a mut W,
}
impl<'a> _LseonW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LsebypW<'a> {
register: &'a mut W,
}
impl<'a> _LsebypW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LsedrvW<'a> {
register: &'a mut W,
}
impl<'a> _LsedrvW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 3;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _RtcselW<'a> {
register: &'a mut W,
}
impl<'a> _RtcselW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _RtcenW<'a> {
register: &'a mut W,
}
impl<'a> _RtcenW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 15;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _BdrstW<'a> {
register: &'a mut W,
}
impl<'a> _BdrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _lseon(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - External Low Speed oscillator enable" ]
pub fn lseon(&self) -> LseonR {
LseonR { bits: self._lseon() }
}
fn _lserdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - External Low Speed oscillator ready" ]
pub fn lserdy(&self) -> LserdyR {
LserdyR { bits: self._lserdy() }
}
fn _lsebyp(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 2 - External Low Speed oscillator bypass" ]
pub fn lsebyp(&self) -> LsebypR {
LsebypR { bits: self._lsebyp() }
}
fn _lsedrv(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 3:4 - LSE oscillator drive capability" ]
pub fn lsedrv(&self) -> LsedrvR {
LsedrvR { bits: self._lsedrv() }
}
fn _rtcsel(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 8:9 - RTC clock source selection" ]
pub fn rtcsel(&self) -> RtcselR {
RtcselR { bits: self._rtcsel() }
}
fn _rtcen(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 15;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 15 - RTC clock enable" ]
pub fn rtcen(&self) -> RtcenR {
RtcenR { bits: self._rtcen() }
}
fn _bdrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 16 - Backup domain software reset" ]
pub fn bdrst(&self) -> BdrstR {
BdrstR { bits: self._bdrst() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - External Low Speed oscillator enable" ]
pub fn lseon(&mut self) -> _LseonW {
_LseonW { register: self }
}
# [ doc = "Bit 2 - External Low Speed oscillator bypass" ]
pub fn lsebyp(&mut self) -> _LsebypW {
_LsebypW { register: self }
}
# [ doc = "Bits 3:4 - LSE oscillator drive capability" ]
pub fn lsedrv(&mut self) -> _LsedrvW {
_LsedrvW { register: self }
}
# [ doc = "Bits 8:9 - RTC clock source selection" ]
pub fn rtcsel(&mut self) -> _RtcselW {
_RtcselW { register: self }
}
# [ doc = "Bit 15 - RTC clock enable" ]
pub fn rtcen(&mut self) -> _RtcenW {
_RtcenW { register: self }
}
# [ doc = "Bit 16 - Backup domain software reset" ]
pub fn bdrst(&mut self) -> _BdrstW {
_BdrstW { register: self }
}
}
}
# [ doc = "Control/status register (RCC_CSR)" ]
# [ repr ( C ) ]
pub struct Csr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Control/status register (RCC_CSR)" ]
pub mod csr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Csr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field LSION" ]
pub struct LsionR {
bits: u8,
}
impl LsionR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LSIRDY" ]
pub struct LsirdyR {
bits: u8,
}
impl LsirdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field RMVF" ]
pub struct RmvfR {
bits: u8,
}
impl RmvfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field OBLRSTF" ]
pub struct OblrstfR {
bits: u8,
}
impl OblrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PINRSTF" ]
pub struct PinrstfR {
bits: u8,
}
impl PinrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field PORRSTF" ]
pub struct PorrstfR {
bits: u8,
}
impl PorrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field SFTRSTF" ]
pub struct SftrstfR {
bits: u8,
}
impl SftrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IWDGRSTF" ]
pub struct IwdgrstfR {
bits: u8,
}
impl IwdgrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field WWDGRSTF" ]
pub struct WwdgrstfR {
bits: u8,
}
impl WwdgrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field LPWRRSTF" ]
pub struct LpwrrstfR {
bits: u8,
}
impl LpwrrstfR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _LsionW<'a> {
register: &'a mut W,
}
impl<'a> _LsionW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _RmvfW<'a> {
register: &'a mut W,
}
impl<'a> _RmvfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _OblrstfW<'a> {
register: &'a mut W,
}
impl<'a> _OblrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PinrstfW<'a> {
register: &'a mut W,
}
impl<'a> _PinrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 26;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _PorrstfW<'a> {
register: &'a mut W,
}
impl<'a> _PorrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _SftrstfW<'a> {
register: &'a mut W,
}
impl<'a> _SftrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IwdgrstfW<'a> {
register: &'a mut W,
}
impl<'a> _IwdgrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _WwdgrstfW<'a> {
register: &'a mut W,
}
impl<'a> _WwdgrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _LpwrrstfW<'a> {
register: &'a mut W,
}
impl<'a> _LpwrrstfW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 31;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _lsion(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - Internal low speed oscillator enable" ]
pub fn lsion(&self) -> LsionR {
LsionR { bits: self._lsion() }
}
fn _lsirdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - Internal low speed oscillator ready" ]
pub fn lsirdy(&self) -> LsirdyR {
LsirdyR { bits: self._lsirdy() }
}
fn _rmvf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 24 - Remove reset flag" ]
pub fn rmvf(&self) -> RmvfR {
RmvfR { bits: self._rmvf() }
}
fn _oblrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 25 - Option byte loader reset flag" ]
pub fn oblrstf(&self) -> OblrstfR {
OblrstfR { bits: self._oblrstf() }
}
fn _pinrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 26;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 26 - PIN reset flag" ]
pub fn pinrstf(&self) -> PinrstfR {
PinrstfR { bits: self._pinrstf() }
}
fn _porrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 27;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 27 - POR/PDR reset flag" ]
pub fn porrstf(&self) -> PorrstfR {
PorrstfR { bits: self._porrstf() }
}
fn _sftrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 28 - Software reset flag" ]
pub fn sftrstf(&self) -> SftrstfR {
SftrstfR { bits: self._sftrstf() }
}
fn _iwdgrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 29;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 29 - Independent watchdog reset flag" ]
pub fn iwdgrstf(&self) -> IwdgrstfR {
IwdgrstfR { bits: self._iwdgrstf() }
}
fn _wwdgrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 30 - Window watchdog reset flag" ]
pub fn wwdgrstf(&self) -> WwdgrstfR {
WwdgrstfR { bits: self._wwdgrstf() }
}
fn _lpwrrstf(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 31;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 31 - Low-power reset flag" ]
pub fn lpwrrstf(&self) -> LpwrrstfR {
LpwrrstfR { bits: self._lpwrrstf() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 201326592 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - Internal low speed oscillator enable" ]
pub fn lsion(&mut self) -> _LsionW {
_LsionW { register: self }
}
# [ doc = "Bit 24 - Remove reset flag" ]
pub fn rmvf(&mut self) -> _RmvfW {
_RmvfW { register: self }
}
# [ doc = "Bit 25 - Option byte loader reset flag" ]
pub fn oblrstf(&mut self) -> _OblrstfW {
_OblrstfW { register: self }
}
# [ doc = "Bit 26 - PIN reset flag" ]
pub fn pinrstf(&mut self) -> _PinrstfW {
_PinrstfW { register: self }
}
# [ doc = "Bit 27 - POR/PDR reset flag" ]
pub fn porrstf(&mut self) -> _PorrstfW {
_PorrstfW { register: self }
}
# [ doc = "Bit 28 - Software reset flag" ]
pub fn sftrstf(&mut self) -> _SftrstfW {
_SftrstfW { register: self }
}
# [ doc = "Bit 29 - Independent watchdog reset flag" ]
pub fn iwdgrstf(&mut self) -> _IwdgrstfW {
_IwdgrstfW { register: self }
}
# [ doc = "Bit 30 - Window watchdog reset flag" ]
pub fn wwdgrstf(&mut self) -> _WwdgrstfW {
_WwdgrstfW { register: self }
}
# [ doc = "Bit 31 - Low-power reset flag" ]
pub fn lpwrrstf(&mut self) -> _LpwrrstfW {
_LpwrrstfW { register: self }
}
}
}
# [ doc = "AHB peripheral reset register" ]
# [ repr ( C ) ]
pub struct Ahbrstr {
register: ::volatile_register::RW<u32>,
}
# [ doc = "AHB peripheral reset register" ]
pub mod ahbrstr {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Ahbrstr {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field IOPARST" ]
pub struct IoparstR {
bits: u8,
}
impl IoparstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPBRST" ]
pub struct IopbrstR {
bits: u8,
}
impl IopbrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPCRST" ]
pub struct IopcrstR {
bits: u8,
}
impl IopcrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPDRST" ]
pub struct IopdrstR {
bits: u8,
}
impl IopdrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field IOPFRST" ]
pub struct IopfrstR {
bits: u8,
}
impl IopfrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field TSCRST" ]
pub struct TscrstR {
bits: u8,
}
impl TscrstR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _IoparstW<'a> {
register: &'a mut W,
}
impl<'a> _IoparstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopbrstW<'a> {
register: &'a mut W,
}
impl<'a> _IopbrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopcrstW<'a> {
register: &'a mut W,
}
impl<'a> _IopcrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopdrstW<'a> {
register: &'a mut W,
}
impl<'a> _IopdrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 20;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _IopfrstW<'a> {
register: &'a mut W,
}
impl<'a> _IopfrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _TscrstW<'a> {
register: &'a mut W,
}
impl<'a> _TscrstW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _ioparst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - I/O port A reset" ]
pub fn ioparst(&self) -> IoparstR {
IoparstR { bits: self._ioparst() }
}
fn _iopbrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 18 - I/O port B reset" ]
pub fn iopbrst(&self) -> IopbrstR {
IopbrstR { bits: self._iopbrst() }
}
fn _iopcrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 19 - I/O port C reset" ]
pub fn iopcrst(&self) -> IopcrstR {
IopcrstR { bits: self._iopcrst() }
}
fn _iopdrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 20 - I/O port D reset" ]
pub fn iopdrst(&self) -> IopdrstR {
IopdrstR { bits: self._iopdrst() }
}
fn _iopfrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 22 - I/O port F reset" ]
pub fn iopfrst(&self) -> IopfrstR {
IopfrstR { bits: self._iopfrst() }
}
fn _tscrst(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 24 - Touch sensing controller reset" ]
pub fn tscrst(&self) -> TscrstR {
TscrstR { bits: self._tscrst() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 17 - I/O port A reset" ]
pub fn ioparst(&mut self) -> _IoparstW {
_IoparstW { register: self }
}
# [ doc = "Bit 18 - I/O port B reset" ]
pub fn iopbrst(&mut self) -> _IopbrstW {
_IopbrstW { register: self }
}
# [ doc = "Bit 19 - I/O port C reset" ]
pub fn iopcrst(&mut self) -> _IopcrstW {
_IopcrstW { register: self }
}
# [ doc = "Bit 20 - I/O port D reset" ]
pub fn iopdrst(&mut self) -> _IopdrstW {
_IopdrstW { register: self }
}
# [ doc = "Bit 22 - I/O port F reset" ]
pub fn iopfrst(&mut self) -> _IopfrstW {
_IopfrstW { register: self }
}
# [ doc = "Bit 24 - Touch sensing controller reset" ]
pub fn tscrst(&mut self) -> _TscrstW {
_TscrstW { register: self }
}
}
}
# [ doc = "Clock configuration register 2" ]
# [ repr ( C ) ]
pub struct Cfgr2 {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock configuration register 2" ]
pub mod cfgr2 {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cfgr2 {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field PREDIV" ]
pub struct PredivR {
bits: u8,
}
impl PredivR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _PredivW<'a> {
register: &'a mut W,
}
impl<'a> _PredivW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _prediv(&self) -> u8 {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 0:3 - PREDIV division factor" ]
pub fn prediv(&self) -> PredivR {
PredivR { bits: self._prediv() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bits 0:3 - PREDIV division factor" ]
pub fn prediv(&mut self) -> _PredivW {
_PredivW { register: self }
}
}
}
# [ doc = "Clock configuration register 3" ]
# [ repr ( C ) ]
pub struct Cfgr3 {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock configuration register 3" ]
pub mod cfgr3 {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cfgr3 {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field USART1SW" ]
pub struct Usart1swR {
bits: u8,
}
impl Usart1swR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field I2C1SW" ]
pub struct I2c1swR {
bits: u8,
}
impl I2c1swR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field CECSW" ]
pub struct CecswR {
bits: u8,
}
impl CecswR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USBSW" ]
pub struct UsbswR {
bits: u8,
}
impl UsbswR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field ADCSW" ]
pub struct AdcswR {
bits: u8,
}
impl AdcswR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field USART2SW" ]
pub struct Usart2swR {
bits: u8,
}
impl Usart2swR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _Usart1swW<'a> {
register: &'a mut W,
}
impl<'a> _Usart1swW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _I2c1swW<'a> {
register: &'a mut W,
}
impl<'a> _I2c1swW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _CecswW<'a> {
register: &'a mut W,
}
impl<'a> _CecswW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 6;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _UsbswW<'a> {
register: &'a mut W,
}
impl<'a> _UsbswW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 7;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _AdcswW<'a> {
register: &'a mut W,
}
impl<'a> _AdcswW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Usart2swW<'a> {
register: &'a mut W,
}
impl<'a> _Usart2swW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _usart1sw(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 0:1 - USART1 clock source selection" ]
pub fn usart1sw(&self) -> Usart1swR {
Usart1swR { bits: self._usart1sw() }
}
fn _i2c1sw(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 4 - I2C1 clock source selection" ]
pub fn i2c1sw(&self) -> I2c1swR {
I2c1swR { bits: self._i2c1sw() }
}
fn _cecsw(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 6 - HDMI CEC clock source selection" ]
pub fn cecsw(&self) -> CecswR {
CecswR { bits: self._cecsw() }
}
fn _usbsw(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 7;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 7 - USB clock source selection" ]
pub fn usbsw(&self) -> UsbswR {
UsbswR { bits: self._usbsw() }
}
fn _adcsw(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 8 - ADC clock source selection" ]
pub fn adcsw(&self) -> AdcswR {
AdcswR { bits: self._adcsw() }
}
fn _usart2sw(&self) -> u8 {
const MASK: u8 = 3;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 16:17 - USART2 clock source selection" ]
pub fn usart2sw(&self) -> Usart2swR {
Usart2swR { bits: self._usart2sw() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 0 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bits 0:1 - USART1 clock source selection" ]
pub fn usart1sw(&mut self) -> _Usart1swW {
_Usart1swW { register: self }
}
# [ doc = "Bit 4 - I2C1 clock source selection" ]
pub fn i2c1sw(&mut self) -> _I2c1swW {
_I2c1swW { register: self }
}
# [ doc = "Bit 6 - HDMI CEC clock source selection" ]
pub fn cecsw(&mut self) -> _CecswW {
_CecswW { register: self }
}
# [ doc = "Bit 7 - USB clock source selection" ]
pub fn usbsw(&mut self) -> _UsbswW {
_UsbswW { register: self }
}
# [ doc = "Bit 8 - ADC clock source selection" ]
pub fn adcsw(&mut self) -> _AdcswW {
_AdcswW { register: self }
}
# [ doc = "Bits 16:17 - USART2 clock source selection" ]
pub fn usart2sw(&mut self) -> _Usart2swW {
_Usart2swW { register: self }
}
}
}
# [ doc = "Clock control register 2" ]
# [ repr ( C ) ]
pub struct Cr2 {
register: ::volatile_register::RW<u32>,
}
# [ doc = "Clock control register 2" ]
pub mod cr2 {
# [ doc = r" Value read from the register" ]
pub struct R {
bits: u32,
}
# [ doc = r" Value to write to the register" ]
pub struct W {
bits: u32,
}
impl super::Cr2 {
# [ doc = r" Modifies the contents of the register" ]
pub fn modify<F>(&mut self, f: F)
where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W
{
let bits = self.register.read();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.write(w.bits);
}
# [ doc = r" Reads the contents of the register" ]
pub fn read(&self) -> R {
R { bits: self.register.read() }
}
# [ doc = r" Writes to the register" ]
pub fn write<F>(&mut self, f: F)
where F: FnOnce(&mut W) -> &mut W
{
let mut w = W::reset_value();
f(&mut w);
self.register.write(w.bits);
}
}
# [ doc = "Value of the field HSI14ON" ]
pub struct Hsi14onR {
bits: u8,
}
impl Hsi14onR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14RDY" ]
pub struct Hsi14rdyR {
bits: u8,
}
impl Hsi14rdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14DIS" ]
pub struct Hsi14disR {
bits: u8,
}
impl Hsi14disR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14TRIM" ]
pub struct Hsi14trimR {
bits: u8,
}
impl Hsi14trimR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI14CAL" ]
pub struct Hsi14calR {
bits: u8,
}
impl Hsi14calR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI48ON" ]
pub struct Hsi48onR {
bits: u8,
}
impl Hsi48onR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI48RDY" ]
pub struct Hsi48rdyR {
bits: u8,
}
impl Hsi48rdyR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = "Value of the field HSI48CAL" ]
pub struct Hsi48calR {
bits: u8,
}
impl Hsi48calR {
# [ doc = r" Value of the field as raw bits" ]
pub fn bits(&self) -> u8 {
self.bits
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi14onW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi14onW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi14disW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi14disW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi14trimW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi14trimW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 31;
const OFFSET: u8 = 3;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
# [ doc = r" Proxy" ]
pub struct _Hsi48onW<'a> {
register: &'a mut W,
}
impl<'a> _Hsi48onW<'a> {
# [ doc = r" Writes raw `bits` to the field" ]
pub unsafe fn bits(self, bits: u8) -> &'a mut W {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
self.register.bits &= !((MASK as u32) << OFFSET);
self.register.bits |= ((bits & MASK) as u32) << OFFSET;
self.register
}
}
impl R {
# [ doc = r" Value of the register as raw bits" ]
pub fn bits(&self) -> u32 {
self.bits
}
fn _hsi14on(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 0 - HSI14 clock enable" ]
pub fn hsi14on(&self) -> Hsi14onR {
Hsi14onR { bits: self._hsi14on() }
}
fn _hsi14rdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 1 - HR14 clock ready flag" ]
pub fn hsi14rdy(&self) -> Hsi14rdyR {
Hsi14rdyR { bits: self._hsi14rdy() }
}
fn _hsi14dis(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 2 - HSI14 clock request from ADC disable" ]
pub fn hsi14dis(&self) -> Hsi14disR {
Hsi14disR { bits: self._hsi14dis() }
}
fn _hsi14trim(&self) -> u8 {
const MASK: u8 = 31;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 3:7 - HSI14 clock trimming" ]
pub fn hsi14trim(&self) -> Hsi14trimR {
Hsi14trimR { bits: self._hsi14trim() }
}
fn _hsi14cal(&self) -> u8 {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bits 8:15 - HSI14 clock calibration" ]
pub fn hsi14cal(&self) -> Hsi14calR {
Hsi14calR { bits: self._hsi14cal() }
}
fn _hsi48on(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 16 - HSI48 clock enable" ]
pub fn hsi48on(&self) -> Hsi48onR {
Hsi48onR { bits: self._hsi48on() }
}
fn _hsi48rdy(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 17 - HSI48 clock ready flag" ]
pub fn hsi48rdy(&self) -> Hsi48rdyR {
Hsi48rdyR { bits: self._hsi48rdy() }
}
fn _hsi48cal(&self) -> u8 {
const MASK: u8 = 1;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
}
# [ doc = "Bit 24 - HSI48 factory clock calibration" ]
pub fn hsi48cal(&self) -> Hsi48calR {
Hsi48calR { bits: self._hsi48cal() }
}
}
impl W {
# [ doc = r" Reset value of the register" ]
pub fn reset_value() -> W {
W { bits: 128 }
}
# [ doc = r" Writes raw `bits` to the register" ]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
# [ doc = "Bit 0 - HSI14 clock enable" ]
pub fn hsi14on(&mut self) -> _Hsi14onW {
_Hsi14onW { register: self }
}
# [ doc = "Bit 2 - HSI14 clock request from ADC disable" ]
pub fn hsi14dis(&mut self) -> _Hsi14disW {
_Hsi14disW { register: self }
}
# [ doc = "Bits 3:7 - HSI14 clock trimming" ]
pub fn hsi14trim(&mut self) -> _Hsi14trimW {
_Hsi14trimW { register: self }
}
# [ doc = "Bit 16 - HSI48 clock enable" ]
pub fn hsi48on(&mut self) -> _Hsi48onW {
_Hsi48onW { register: self }
}
}
}
|
use std::collections::{HashMap, HashSet};
use std::sync::{Arc, mpsc, Mutex, RwLock, RwLockReadGuard};
use std::thread;
use crate::component::Component;
use crate::event::Event;
use crate::event::component::{AddComponentEvent, ComponentEvent, RemoveComponentEvent};
use crate::event::core::ShutdownEvent;
use crate::event::scene::{AddEntityEvent, AddSceneEvent, RemoveEntityEvent, RemoveSceneEvent, SnapshotEvent};
use crate::util::{Id, InnerThread, Time};
use self::event_thread::scene_manager_event_thread;
#[derive(Debug)]
pub struct SceneManager {
snapshot_queue: Arc<Mutex<Vec<SnapshotEvent>>>,
scene_stack: Arc<RwLock<SceneStack>>,
events: Mutex<mpsc::Sender<Box<dyn Event>>>,
receiver: Mutex<mpsc::Receiver<Box<dyn Event>>>, // For notifying about things like client input mispredictions
event_thread: InnerThread,
running: Mutex<bool>,
}
impl SceneManager {
pub fn new() -> Self {
let snapshot_queue = Arc::new(Mutex::new(Vec::new()));
let scene_stack = Arc::new(RwLock::new(SceneStack::new()));
let (events, events_receiver) = mpsc::channel();
let (outgoing_events_sender, receiver) = mpsc::channel();
let event_thread = InnerThread::new({
let snapshot_queue = snapshot_queue.clone();
let scene_stack = scene_stack.clone();
thread::Builder::new()
.name("SceneManager event thread".to_string())
.spawn(move || scene_manager_event_thread(
snapshot_queue,
scene_stack,
events_receiver,
outgoing_events_sender,
)).unwrap()
});
Self {
snapshot_queue,
scene_stack,
events: Mutex::new(events),
receiver: Mutex::new(receiver),
event_thread,
running: Mutex::new(true),
}
}
pub fn process_event(&self, event: Box<dyn Event>) {
let guard = self.events.lock().unwrap();
guard.send(event).unwrap();
}
pub fn interpolate(&self, interpolation_time: Time) -> InterpolatedSceneStack {
let scene_stack_guard = self.scene_stack.read().unwrap();
let snapshot_queue_guard = self.snapshot_queue.lock().unwrap();
let mut interpolation = InterpolatedSceneStack {
time: Time::new(0, 0.0),
base: scene_stack_guard,
interpolated: HashMap::new(),
removed_scenes: HashSet::new(),
removed_entities: HashMap::new(),
removed_components: HashMap::new(),
};
'iter_snapshot: for (i, snapshot) in snapshot_queue_guard.iter().enumerate() {
if snapshot.tick <= interpolation_time {
interpolation.time = snapshot.tick.into();
for event in snapshot.events.iter() {
if let Some(add_scene_event) = event.as_any().downcast_ref::<AddSceneEvent>() {
interpolation.add_scene(
&add_scene_event.scene_id,
add_scene_event.scene.clone(),
);
} else if let Some(remove_scene_event) = event.as_any().downcast_ref::<RemoveSceneEvent>() {
interpolation.remove_scene(
&remove_scene_event.scene_id,
);
} else if let Some(add_entity_event) = event.as_any().downcast_ref::<AddEntityEvent>() {
interpolation.add_entity(
&add_entity_event.scene_id,
&add_entity_event.entity_id,
add_entity_event.entity.clone(),
);
} else if let Some(remove_entity_event) = event.as_any().downcast_ref::<RemoveEntityEvent>() {
interpolation.remove_entity(
&remove_entity_event.scene_id,
&remove_entity_event.entity_id,
);
} else if let Some(add_component_event) = event.as_any().downcast_ref::<AddComponentEvent>() {
interpolation.add_component(
&add_component_event.scene_id,
&add_component_event.entity_id,
add_component_event.component.clone(),
);
} else if let Some(remove_component_event) = event.as_any().downcast_ref::<RemoveComponentEvent>() {
interpolation.remove_component(
&remove_component_event.scene_id,
&remove_component_event.entity_id,
&remove_component_event.component_id,
);
} else if let Some(component_event) = event.as_any().downcast_ref::<ComponentEvent>() {
interpolation.interpolate_component_event(
&component_event.scene_id,
&component_event.entity_id,
&component_event.component_id,
component_event.payload.clone().into(),
1.0,
);
}
}
} else if i > 0 {
let previous_snapshot = &snapshot_queue_guard[i - 1];
if previous_snapshot.tick > interpolation_time {
continue 'iter_snapshot;
}
interpolation.time = interpolation_time;
let interpolation_amount = (interpolation_time - previous_snapshot.tick).as_f32() / (snapshot.tick - previous_snapshot.tick) as f32;
for event in snapshot.events.iter() {
if let Some(component_event) = event.as_any().downcast_ref::<ComponentEvent>() {
interpolation.interpolate_component_event(
&component_event.scene_id,
&component_event.entity_id,
&component_event.component_id,
component_event.payload.clone().into(),
interpolation_amount,
);
}
}
break 'iter_snapshot;
}
}
interpolation
}
pub fn shutdown(&self) {
let mut running = self.running.lock().unwrap();
if *running {
// Send a shutdown event to the event thread
self.process_event(Box::new(ShutdownEvent { }));
self.event_thread.join();
*running = false;
}
}
}
impl Drop for SceneManager {
fn drop(&mut self) {
self.shutdown();
}
}
pub struct InterpolatedSceneStack<'a> {
time: Time,
base: RwLockReadGuard<'a, SceneStack>,
interpolated: HashMap<Id, Scene>,
removed_scenes: HashSet<Id>,
removed_entities: HashMap<Id, HashSet<Id>>,
removed_components: HashMap<Id, HashMap<Id, HashSet<Id>>>,
}
impl<'a> InterpolatedSceneStack<'a> {
fn add_scene(&mut self, scene_id: &Id, scene: Scene) {
self.removed_scenes.remove(scene_id);
for (entity_id, entity) in scene.iter() {
self.removed_entities
.get_mut(scene_id)
.map(|s| s.remove(entity_id));
for component_id in entity.keys() {
self.removed_components
.get_mut(scene_id)
.and_then(|s| s.get_mut(entity_id))
.map(|e| e.remove(component_id));
}
}
self.interpolated.insert(
scene_id.clone(),
scene,
);
}
fn remove_scene(&mut self, scene_id: &Id) {
let removed_scene = self.interpolated.remove(scene_id);
let scene = removed_scene.as_ref().or(self.base.scenes.get(scene_id));
if let Some(scene) = scene {
self.removed_scenes.insert(scene_id.clone());
for (entity_id, entity) in scene.iter() {
let scene_entry = self.removed_entities.entry(scene_id.clone()).or_insert(HashSet::new());
scene_entry.insert(entity_id.clone());
for component_id in entity.keys() {
let scene_entry = self.removed_components.entry(scene_id.clone()).or_insert(HashMap::new());
let entity_entry = scene_entry.entry(entity_id.clone()).or_insert(HashSet::new());
entity_entry.insert(component_id.clone());
}
}
}
}
fn add_entity(&mut self, scene_id: &Id, entity_id: &Id, entity: Entity) {
self.removed_entities
.get_mut(scene_id)
.map(|s| s.remove(entity_id));
for component_id in entity.keys() {
self.removed_components
.get_mut(scene_id)
.and_then(|s| s.get_mut(entity_id))
.map(|e| e.remove(component_id));
}
let scene_entry = self.interpolated.entry(scene_id.clone()).or_insert(Scene::new());
scene_entry.insert(entity_id.clone(), entity);
}
fn remove_entity(&mut self, scene_id: &Id, entity_id: &Id) {
let removed_entity = self.interpolated
.get_mut(scene_id)
.and_then(|s| s.remove(entity_id));
let entity = removed_entity.as_ref().or(self.base.scenes
.get(scene_id)
.and_then(|s| s.get(entity_id))
);
let scene_entry = self.removed_entities.entry(scene_id.clone()).or_insert(HashSet::new());
scene_entry.insert(entity_id.clone());
if let Some(entity) = entity {
for component_id in entity.keys() {
let scene_entry = self.removed_components.entry(scene_id.clone()).or_insert(HashMap::new());
let entity_entry = scene_entry.entry(entity_id.clone()).or_insert(HashSet::new());
entity_entry.insert(component_id.clone());
}
}
}
fn add_component(&mut self, scene_id: &Id, entity_id: &Id, component: Box<dyn Component>) {
self.removed_components
.get_mut(scene_id)
.and_then(|s| s.get_mut(entity_id))
.map(|e| e.remove(&component.get_id()));
let scene_entry = self.interpolated.entry(scene_id.clone()).or_insert(Scene::new());
let entity_entry = scene_entry.entry(entity_id.clone()).or_insert(Entity::new());
entity_entry.insert(component.get_id(), component);
}
fn remove_component(&mut self, scene_id: &Id, entity_id: &Id, component_id: &Id) {
self.interpolated
.get_mut(scene_id)
.and_then(|s| s.get_mut(entity_id))
.map(|e| e.remove(component_id));
let scene_entry = self.removed_components.entry(scene_id.clone()).or_insert(HashMap::new());
let entity_entry = scene_entry.entry(entity_id.clone()).or_insert(HashSet::new());
entity_entry.insert(component_id.clone());
}
fn interpolate_component_event(&mut self, scene_id: &Id, entity_id: &Id, component_id: &Id, event: Box<dyn Event>, interpolation: f32) {
let clamped_interpolation = interpolation.min(1.0).max(0.0);
if let Some(component) = self.get_component(scene_id, entity_id, component_id) {
let interpolated_component = component.interpolate_event(
self,
event,
clamped_interpolation,
);
self.add_component(scene_id, entity_id, interpolated_component);
} else {
log!(
ERROR,
"Trying to interpolate an event on a component that doesn't exist: ({:?}, {:?}, {:?}) {:?}",
scene_id,
entity_id,
component_id,
event,
);
}
}
pub fn get_time(&self) -> Time {
self.time
}
pub fn get_scene(&self, scene_id: &Id) -> Option<&Scene> {
self.interpolated.get(scene_id).or(self.base.scenes.get(scene_id)).filter(|_| {
!self.removed_scenes.contains(scene_id)
})
}
pub fn get_entity(&self, scene_id: &Id, entity_id: &Id) -> Option<&Entity> {
self.get_scene(scene_id).and_then(|s| s.get(entity_id)).filter(|_| {
!self.removed_entities
.get(scene_id)
.map(|s| s.contains(entity_id))
.unwrap_or(false)
})
}
pub fn get_component(&self, scene_id: &Id, entity_id: &Id, component_id: &Id) -> Option<&Box<dyn Component>> {
self.get_entity(scene_id, entity_id).and_then(|e| e.get(component_id)).filter(|_| {
!self.removed_components
.get(scene_id)
.and_then(|s| s.get(entity_id))
.map(|e| e.contains(component_id))
.unwrap_or(false)
})
}
}
pub type Entity = HashMap<Id, Box<dyn Component>>;
pub type Scene = HashMap<Id, Entity>;
#[derive(Debug)]
pub struct SceneStack {
scenes: HashMap<Id, Scene>,
scene_order: Vec<Id>,
}
impl SceneStack {
fn new() -> Self {
Self {
scenes: HashMap::new(),
scene_order: Vec::new(),
}
}
}
mod event_thread; |
use crate::ui::Refresh;
use gtk::prelude::*;
use sysinfo::SystemExt;
pub struct Load {
pub container: gtk::Box,
pub label: gtk::Label,
pub values: gtk::Label,
}
impl Load {
pub fn new() -> Self {
let container = gtk::BoxBuilder::new()
.expand(true)
.spacing(4)
.orientation(gtk::Orientation::Horizontal)
.build();
let label = gtk::LabelBuilder::new()
.expand(true)
.label("Load average: ")
.build();
let values = gtk::LabelBuilder::new()
.expand(true)
.label("Loading...")
.build();
container.add(&label);
container.add(&values);
Self {
container,
label,
values,
}
}
pub fn set_values(&self, load_one: f64, load_five: f64, load_fifteen: f64) {
let label_text = format!(
"1\" : {:.2}% 5\" : {:.2}% 15\" : {:.2}%",
load_one, load_five, load_fifteen
);
self.values.set_label(&label_text);
}
}
impl Refresh for Load {
fn refresh(&self, system: &sysinfo::System) {
let load_avg = system.get_load_average();
self.set_values(load_avg.one, load_avg.five, load_avg.fifteen);
}
}
|
/// The Stack trait represents a last-in-first-out (LIFO) stack of objects
pub trait Stack<T>{
fn push(&mut self, T);
fn pop(&mut self) -> T;
fn top(&self) -> &T;
}
/// Thread unsafe implementation of a stack on heap-allocated
/// a linked list.
///
/// # Example
/// ```rust
///
/// use collections::stack::*;
///
/// let mut stack = LinkedStack::new();
/// stack.push(50);
/// stack.push(10);
/// assert_eq!(stack.pop(), 10);
/// assert_eq!(stack.pop(), 50);
/// ```
///
#[derive(Debug)]
pub struct LinkedStack<T>{
top: Option<Box<StackNode<T>>>,
len: usize,
}
impl<T> LinkedStack<T> {
pub fn new() -> LinkedStack<T>{
LinkedStack{ top: None, len: 0 }
}
pub fn len(&self) -> usize {
self.len
}
}
impl<T> Stack<T> for LinkedStack<T> {
fn push(&mut self, item: T) {
self.top = Some(Box::new(StackNode{
data: item,
next: self.top.take(),
}));
self.len += 1;
}
fn pop(&mut self) -> T {
let StackNode{ data, next} = *match self.top.take(){
Some(n) => n,
None => panic!("Cannot pop elements from an empty stack!"),
};
self.len -= 1;
self.top = next;
data
}
fn top (& self) -> & T {
match self.top {
None => panic!("Stack is empty!"),
Some(ref n) => & n.data
}
}
}
#[derive(Debug)]
struct StackNode<T> {
data: T,
next: Option<Box<StackNode<T>>>,
}
#[test]
#[should_panic(expected = "Cannot pop elements from an empty stack!")]
fn empty_stack_pop(){
let mut stack = LinkedStack::<usize>::new();
stack.pop();
}
#[test]
#[should_panic(expected = "Stack is empty")]
fn empty_stack_top(){
let stack = LinkedStack::<usize>::new();
stack.top();
}
#[test]
fn push_test() {
let mut stack = LinkedStack::new();
stack.push(5);
assert_eq!(5, *stack.top());
stack.push(6);
assert_eq!(6, *stack.top());
}
#[test]
fn pop_test(){
let mut stack= LinkedStack::new();
for i in 0..10{
stack.push(i);
}
for i in 10..0 {
assert_eq!(i, stack.pop());
}
}
#[test]
fn test_len(){
let mut stack= LinkedStack::new();
for i in 0..10 {
assert_eq!(i, stack.len());
stack.push(i);
}
for i in 10..0 {
assert_eq!(i, stack.len());
stack.pop();
}
}
|
#![feature(asm)]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![no_std]
#[macro_use]
mod board;
pub mod kernel;
mod mmio;
mod time;
|
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
use std::io::stdin;
/**
* @brief Cell enumuration:
* enumuration of the states each cell that
* comprise the board
*/
#[derive(PartialEq)]
enum Cell {
Empty, //cell is empty
O, //cell is occupied by player O
X //cell is occupied by player X
}
//Default trait implementation for Cell
impl Default for Cell {
/**
* @brief default method:
* initializes default value
*/
fn default() -> Self {
Cell::Empty //cell is empty by default
}
}
//Display trait implementation for Cell
impl Display for Cell {
/**
* @brief fmt method:
* allows for formatted printing of
* the enumerated value
*
* @param[in] self:
* immutable reference to self
*
* @param[in] formatter:
* reference to mutable formatter for printing to
*
* @returns:
* formatter result
*/
fn fmt(&self, formatter: &mut Formatter) -> Result {
let value = match *self {
Cell::Empty => ' '.to_string(),
Cell::O => 'O'.to_string(),
Cell::X => 'X'.to_string()
};
write!(formatter, "{}", value)
}
}
//Cell trait
impl Cell {
/**
* @brief set method:
* set the value of the cell
*
* @param[in] self:
* mutable reference to self
*
* @param[in] value:
* immutable value to set the cell to,
* this value can only be 'x' or 'o'
*
* @returns:
* success: true
* failure: false
*/
fn set(&mut self, value: char) -> bool {
match *self {
Cell::Empty => (), //only proceed if the cell is empty
_ => return false, //otherwise return failure
}
match value {
'o' => *self = Cell::O, //only process if we are setting 'o'
'x' => *self = Cell::X, //or 'x'
_ => return false //otherwise return failure
}
return true;
}
}
/**
* @brief Board structure:
* structure containing the cells comprising
* the board
*/
#[derive(Default)]
pub struct Board {
a0: Cell, b0: Cell, c0: Cell,
a1: Cell, b1: Cell, c1: Cell,
a2: Cell, b2: Cell, c2: Cell
}
//Board trait
impl Board {
/**
* @brief draw method:
* draw the current state of the
* board
*
* @param[in] self:
* immutable reference to self
*/
fn draw(&self) {
println!(" A B C");
println!("0 {0} {1} {2}", self.a0, self.b0, self.c0);
println!("1 {0} {1} {2}", self.a1, self.b1, self.c1);
println!("2 {0} {1} {2}", self.a2, self.b2, self.c2);
}
/**
* @brief process_turn method:
* process player turn and modify the
* state of the board accordingly
*
* @param[in] self:
* mutable reference to self
*
* @param[in] player:
* char representing which players turn
* it is (either 'o' or 'x')
*
* @param[in] position:
* position on the board that the turn
* being processed shall modify
*
* @returns:
* success: true
* failure: false
*/
fn process_turn(&mut self, player: char, position: &str) -> bool {
match player {
'o' => (), //ensure the player is either 'o'
'x' => (), //or 'x'
_ => return false //otherwise return failure
}
match position {
"a0" => return self.a0.set(player),
"a1" => return self.a1.set(player),
"a2" => return self.a2.set(player),
"b0" => return self.b0.set(player),
"b1" => return self.b1.set(player),
"b2" => return self.b2.set(player),
"c0" => return self.c0.set(player),
"c1" => return self.c1.set(player),
"c2" => return self.c2.set(player),
_ => return false
}
}
/**
* @brief get_state method:
* get the current state of the board
* and determine if there's a winner
*
* @param[in] self:
* immutable reference to self
*
* @returns:
* 'o': player o wins
* 'x': player x wins
* null: no winner
*/
fn get_state(&self) -> char {
//row 0
if self.a0 == self.b0 && self.a0 == self.c0 {
match self.a0 {
Cell::Empty => return '\0',
Cell::O => return 'o',
Cell::X => return 'x'
}
//row 1
} else if self.a1 == self.b1 && self.a1 == self.c1 {
match self.a1 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//row 2
} else if self.a2 == self.b2 && self.a2 == self.c2 {
match self.a2 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//column a
} else if self.a0 == self.a1 && self.a0 == self.a2 {
match self.a0 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//column b
} else if self.b0 == self.b1 && self.b0 == self.b2 {
match self.b0 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//column c
} else if self.c0 == self.c1 && self.c0 == self.c2 {
match self.c0 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//diagonal top left
} else if self.a0 == self.b1 && self.a0 == self.c2 {
match self.a0 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
//diagonal bot left
} else if self.a2 == self.b1 && self.a2 == self.c0 {
match self.a2 {
Cell::Empty => return '\0',
Cell::O => return 'x',
Cell::X => return 'o'
}
}
return '\0';
}
}
/**
* @brief State enumuration:
* enumuration of the game sate
*/
#[derive(PartialEq)]
pub enum State {
InProgress,
Stalemate,
VictoryO,
VictoryX
}
//Default trait implementation for State
impl Default for State {
/**
* @brief default method:
* initializes default value
*/
fn default() -> Self {
State::InProgress //cell is empty by default
}
}
//Display trait implementation for State
impl Display for State {
/**
* @brief fmt method:
* allows for formatted printing of
* the enumerated value
*
* @param[in] self:
* immutable reference to self
*
* @param[in] formatter:
* reference to mutable formatter for printing to
*
* @returns:
* formatter result
*/
fn fmt(&self, formatter: &mut Formatter) -> Result {
let value = match *self {
State::InProgress => "in progress".to_string(),
State::Stalemate => "stalemate".to_string(),
State::VictoryO => "o wins".to_string(),
State::VictoryX => "x wins".to_string()
};
write!(formatter, "{}", value)
}
}
/**
* @brief Game structure:
* structure of the objects which comprise
* the game
*/
pub struct Game {
board: Board,
pub state: State,
turn: i32
}
//Default trait implementation for Game
impl Default for Game {
/**
* @brief default method:
* initializes default value
*/
fn default() -> Self {
Game {
board: Default::default(),
state: Default::default(),
turn: 1
}
}
}
//Game trait
impl Game {
/**
* @brief get_player method:
* gets current player based on
* the current turn number.
*
* @param[in] self:
* immutable reference to self
*
* @returns:
* player o: 'o'
* player x: 'x'
*/
fn get_player(&self) -> char {
match self.turn % 2 {
0 => return 'o',
_ => return 'x'
}
}
/**
* @brief set_state method:
* set the current game state
*
* @param[in] self:
* mutable reference to self
*/
fn set_state(&mut self) {
match self.board.get_state() {
'o' => self.state = State::VictoryO,
'x' => self.state = State::VictoryX,
_ => ()
}
if self.turn > 9 {
self.state = State::Stalemate;
}
}
/**
* @brief take_turn method:
* handle the current turn
*
* @param[in] self:
* mutable reference to self
*/
pub fn take_turn(&mut self) {
let player = self.get_player();
println!("\n turn: {}", self.turn);
self.board.draw();
loop {
let mut position = String::new();
println!("\nplayer {} move: ", player);
stdin().read_line(&mut position)
.expect("");
position = position.trim_right()
.to_string();
if self.board.process_turn(player, &position) {
break;
}
}
self.turn += 1;
self.set_state();
}
}
|
// 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::Result;
use common_expression::DataBlock;
use common_expression::TableSchemaRef;
use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE;
use storages_common_blocks::blocks_to_parquet;
use storages_common_table_meta::table::TableCompression;
use crate::output_format::OutputFormat;
use crate::FileFormatOptionsExt;
#[derive(Default)]
pub struct ParquetOutputFormat {
schema: TableSchemaRef,
data_blocks: Vec<DataBlock>,
}
impl ParquetOutputFormat {
pub fn create(schema: TableSchemaRef, _options: &FileFormatOptionsExt) -> Self {
Self {
schema,
data_blocks: vec![],
}
}
}
impl OutputFormat for ParquetOutputFormat {
fn serialize_block(&mut self, block: &DataBlock) -> Result<Vec<u8>> {
self.data_blocks.push(block.clone());
Ok(vec![])
}
fn buffer_size(&mut self) -> usize {
self.data_blocks.iter().map(|b| b.memory_size()).sum()
}
fn finalize(&mut self) -> Result<Vec<u8>> {
let blocks = std::mem::take(&mut self.data_blocks);
if blocks.is_empty() {
return Ok(vec![]);
}
let mut buf = Vec::with_capacity(DEFAULT_BLOCK_BUFFER_SIZE);
let _ = blocks_to_parquet(&self.schema, blocks, &mut buf, TableCompression::LZ4)?;
Ok(buf)
}
}
|
table! {
score (sha256) {
sha256 -> Text,
mode -> Integer,
clear -> Integer,
epg -> Integer,
lpg -> Integer,
egr -> Integer,
lgr -> Integer,
egd -> Integer,
lgd -> Integer,
ebd -> Integer,
lbd -> Integer,
epr -> Integer,
lpr -> Integer,
ems -> Integer,
lms -> Integer,
notes -> Integer,
combo -> Integer,
minbp -> Integer,
playcount -> Integer,
clearcount -> Integer,
//history -> Integer, nullが入っていたりする
scorehash -> Text,
option -> Integer,
random -> Integer,
date -> Integer,
state -> Integer,
//trophy -> Text,
//ghost -> Text,
}
}
#[derive(Queryable)]
pub struct Score {
pub sha256: String,
pub mode: i32,
pub clear: i32,
pub epg: i32,
pub lpg: i32,
pub egr: i32,
pub lgr: i32,
pub egd: i32,
pub lgd: i32,
pub ebd: i32,
pub lbd: i32,
pub epr: i32,
pub lpr: i32,
pub ems: i32,
pub lms: i32,
pub notes: i32,
pub combo: i32,
pub minbp: i32,
pub playcount: i32,
pub clearcount: i32,
//pub history: i32,
pub scorehash: String,
pub option: i32,
pub random: i32,
pub date: i32,
pub state: i32,
//pub trophy: String,
//pub ghost: String,
}
|
use int::LargeInt;
use int::Int;
macro_rules! mul {
($(#[$attr:meta])+ |
$abi:tt, $intrinsic:ident: $ty:ty) => {
/// Returns `a * b`
$(#[$attr])+
pub extern $abi fn $intrinsic(a: $ty, b: $ty) -> $ty {
let half_bits = <$ty>::bits() / 4;
let lower_mask = !0 >> half_bits;
let mut low = (a.low() & lower_mask).wrapping_mul(b.low() & lower_mask);
let mut t = low >> half_bits;
low &= lower_mask;
t += (a.low() >> half_bits).wrapping_mul(b.low() & lower_mask);
low += (t & lower_mask) << half_bits;
let mut high = (t >> half_bits) as hty!($ty);
t = low >> half_bits;
low &= lower_mask;
t += (b.low() >> half_bits).wrapping_mul(a.low() & lower_mask);
low += (t & lower_mask) << half_bits;
high += (t >> half_bits) as hty!($ty);
high += (a.low() >> half_bits).wrapping_mul(b.low() >> half_bits) as hty!($ty);
high = high.wrapping_add(a.high().wrapping_mul(b.low() as hty!($ty)))
.wrapping_add((a.low() as hty!($ty)).wrapping_mul(b.high()));
<$ty>::from_parts(low, high)
}
}
}
macro_rules! mulo {
($intrinsic:ident: $ty:ty) => {
// Default is "C" ABI
mulo!($intrinsic: $ty, "C");
};
($intrinsic:ident: $ty:ty, $abi:tt) => {
/// Returns `a * b` and sets `*overflow = 1` if `a * b` overflows
#[cfg_attr(not(test), no_mangle)]
pub extern $abi fn $intrinsic(a: $ty, b: $ty, overflow: &mut i32) -> $ty {
*overflow = 0;
let result = a.wrapping_mul(b);
if a == <$ty>::min_value() {
if b != 0 && b != 1 {
*overflow = 1;
}
return result;
}
if b == <$ty>::min_value() {
if a != 0 && a != 1 {
*overflow = 1;
}
return result;
}
let sa = a >> (<$ty>::bits() - 1);
let abs_a = (a ^ sa) - sa;
let sb = b >> (<$ty>::bits() - 1);
let abs_b = (b ^ sb) - sb;
if abs_a < 2 || abs_b < 2 {
return result;
}
if sa == sb {
if abs_a > <$ty>::max_value() / abs_b {
*overflow = 1;
}
} else {
if abs_a > <$ty>::min_value() / -abs_b {
*overflow = 1;
}
}
result
}
}
}
#[cfg(not(all(feature = "c", target_arch = "x86")))]
mul!(#[cfg_attr(all(not(test), not(target_arch = "arm")), no_mangle)]
#[cfg_attr(all(not(test), target_arch = "arm"), inline(always))]
| "C", __muldi3: u64);
#[cfg(not(target_arch = "arm"))]
mul!(#[cfg_attr(not(test), no_mangle)]
| "C", __multi3: i128);
#[cfg(target_arch = "arm")]
mul!(#[cfg_attr(not(test), no_mangle)]
| "aapcs", __multi3: i128);
mulo!(__mulosi4: i32);
mulo!(__mulodi4: i64);
#[cfg(all(windows, target_pointer_width="64"))]
mulo!(__muloti4: i128, "unadjusted");
#[cfg(not(all(windows, target_pointer_width="64")))]
mulo!(__muloti4: i128);
|
use chrono::{DateTime, Utc};
use diesel::{ExpressionMethods, PgConnection, QueryDsl, RunQueryDsl};
use serde::{Deserialize, Serialize};
use auth::{create_jwt, PrivateClaim, Role};
use errors::Error;
use crate::schema::users;
#[derive(Debug, Queryable, Identifiable, Serialize, Deserialize)]
pub struct User {
pub id: i32,
pub user_name: String,
pub game_id: i32,
pub session_id: Option<String>,
pub score: i32,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
#[derive(Insertable)]
#[table_name = "users"]
pub struct NewUser {
pub user_name: String,
pub game_id: i32,
}
#[derive(Deserialize, Identifiable, Queryable, Serialize)]
#[table_name = "users"]
pub struct UserDetails {
pub id: i32,
pub user_name: String,
pub game_id: i32,
pub score: i32,
}
impl User {
pub fn create(
connection: &PgConnection,
user_name: String,
game_id: i32,
) -> Result<User, Error> {
use crate::schema::users::{dsl, table};
let result: User = diesel::insert_into(table)
.values(NewUser { user_name, game_id })
.get_result(connection)?;
let jwt = create_jwt(PrivateClaim::new(
result.id,
result.user_name,
game_id,
Role::Player,
))?;
let result: User = diesel::update(table)
.set(dsl::session_id.eq(jwt))
.get_result(connection)?;
Ok(result)
}
pub fn find_all_by_game_id(
connection: &PgConnection,
game_id: i32,
) -> Result<Vec<UserDetails>, Error> {
use crate::schema::users::dsl::{game_id as game_id_field, id, score, user_name, users};
let results = users
.select((id, user_name, game_id_field, score))
.filter(game_id_field.eq(game_id))
.get_results::<UserDetails>(connection)?;
Ok(results)
}
pub fn find_by_game_id_and_name(
connection: &PgConnection,
game_id: i32,
user_name: &String,
) -> Result<User, Error> {
use crate::schema::users::dsl::{game_id as gi, user_name as un, users};
let user: User = users
.filter(un.eq(user_name))
.filter(gi.eq(game_id))
.first::<User>(connection)?;
Ok(user)
}
pub fn add_score(connection: &PgConnection, user_id: i32, amount: i32) -> Result<User, Error> {
use crate::schema::users::dsl::{id, score as score_field, users as users_table};
let score = users_table
.select(score_field)
.filter(id.eq(user_id))
.get_result::<i32>(connection)?;
let user = diesel::update(users_table.filter(id.eq(user_id)))
.set(score_field.eq(score + amount))
.get_result(connection)?;
Ok(user)
}
}
|
/// an enum of all defined messages in the Fit SDK
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum MessageType {
AccelerometerData,
Activity,
AntChannelId,
AntRx,
AntTx,
AviationAttitude,
BarometerData,
BikeProfile,
BloodPressure,
CadenceZone,
CameraEvent,
Capabilities,
ClimbPro,
Connectivity,
Course,
CoursePoint,
DeveloperDataId,
DeviceAuxBatteryInfo,
DeviceInfo,
DeviceSettings,
DiveAlarm,
DiveGas,
DiveSettings,
DiveSummary,
Event,
ExdDataConceptConfiguration,
ExdDataFieldConfiguration,
ExdScreenConfiguration,
ExerciseTitle,
FieldCapabilities,
FieldDescription,
FileCapabilities,
FileCreator,
FileId,
Goal,
GpsMetadata,
GyroscopeData,
Hr,
HrZone,
HrmProfile,
Hrv,
Jump,
Lap,
Length,
MagnetometerData,
MemoGlob,
MesgCapabilities,
MetZone,
Monitoring,
MonitoringInfo,
NmeaSentence,
ObdiiData,
OhrSettings,
OneDSensorCalibration,
PowerZone,
Record,
Schedule,
SdmProfile,
SegmentFile,
SegmentId,
SegmentLap,
SegmentLeaderboardEntry,
SegmentPoint,
Session,
Set,
SlaveDevice,
Software,
SpeedZone,
Sport,
StressLevel,
ThreeDSensorCalibration,
TimestampCorrelation,
Totals,
TrainingFile,
UserProfile,
Video,
VideoClip,
VideoDescription,
VideoFrame,
VideoTitle,
WatchfaceSettings,
WeatherAlert,
WeatherConditions,
WeightScale,
Workout,
WorkoutSession,
WorkoutStep,
ZonesTarget,
Pad,
MfgRangeMax,
MfgRangeMin,
None,
}
|
use semver::Version;
#[cfg(docsrs)]
pub fn gdal_version_info(_key: &str) -> String {
"GDAL 3.2.0, released 2222/02/22".to_string()
}
#[cfg(not(docsrs))]
pub fn gdal_version_info(key: &str) -> String {
let c_key = std::ffi::CString::new(key.as_bytes()).unwrap();
unsafe {
let res_ptr = gdal_sys::GDALVersionInfo(c_key.as_ptr());
let c_res = std::ffi::CStr::from_ptr(res_ptr);
c_res.to_string_lossy().into_owned()
}
}
fn main() {
let gdal_version_string = gdal_version_info("--version"); // This expects GDAL to repond with "GDAL Semver , RELEASE DATE"
println!("GDAL version string: \"{}\"", gdal_version_string);
let semver_substring =
&gdal_version_string[4..gdal_version_string.find(',').unwrap_or(12)].trim();
println!("GDAL semver string: \"{}\"", semver_substring);
let detected_version = Version::parse(semver_substring).expect("Could not parse gdal version!");
if detected_version.major < 2 {
panic!(
"The GDAL crate requires a GDAL version >= 2.0.0. Found {}",
detected_version.to_string()
);
}
println!("cargo:rustc-cfg=gdal_{}", detected_version.major);
println!(
"cargo:rustc-cfg=gdal_{}_{}",
detected_version.major, detected_version.minor
);
println!(
"cargo:rustc-cfg=gdal_{}_{}_{}",
detected_version.major, detected_version.minor, detected_version.patch
);
println!("cargo:rustc-cfg=major_is_{}", detected_version.major);
println!("cargo:rustc-cfg=minor_is_{}", detected_version.minor);
println!("cargo:rustc-cfg=patch_is_{}", detected_version.patch);
// we only support GDAL >= 2.0.
for major in 2..=detected_version.major {
println!("cargo:rustc-cfg=major_ge_{}", major);
}
for minor in 0..=detected_version.minor {
println!("cargo:rustc-cfg=minor_ge_{}", minor);
}
for patch in 0..=detected_version.patch {
println!("cargo:rustc-cfg=patch_ge_{}", patch);
}
}
|
use std::ptr::NonNull;
use anyhow::*;
use liblumen_alloc::erts::apply::{find_symbol, DynamicCallee};
use liblumen_alloc::erts::exception;
use liblumen_alloc::erts::process::ffi::ErlangResult;
use liblumen_alloc::erts::process::trace::Trace;
use liblumen_alloc::erts::process::{Frame, Native};
use liblumen_alloc::erts::term::prelude::*;
use liblumen_alloc::{Arity, ModuleFunctionArity};
use crate::erlang::apply::arguments_term_to_vec;
extern "Rust" {
#[link_name = "lumen_rt_apply_3"]
fn runtime_apply_3(
module_function_arity: ModuleFunctionArity,
callee: DynamicCallee,
arguments: Vec<Term>,
) -> ErlangResult;
}
#[export_name = "erlang:apply/3"]
pub extern "C-unwind" fn apply_3(module: Term, function: Term, arguments: Term) -> ErlangResult {
let arc_process = crate::runtime::process::current_process();
match apply_3_impl(module, function, arguments) {
Ok(result) => result,
Err(exception) => arc_process.return_status(Err(exception)),
}
}
fn apply_3_impl(module: Term, function: Term, arguments: Term) -> exception::Result<ErlangResult> {
let module_atom = term_try_into_atom!(module)?;
let function_atom = term_try_into_atom!(function)?;
let argument_vec = arguments_term_to_vec(arguments)?;
let arity = argument_vec.len() as Arity;
let module_function_arity = ModuleFunctionArity {
module: module_atom,
function: function_atom,
arity,
};
match find_symbol(&module_function_arity) {
Some(callee) => Ok(unsafe { runtime_apply_3(module_function_arity, callee, argument_vec) }),
None => {
let trace = Trace::capture();
trace.set_top_frame(&module_function_arity, argument_vec.as_slice());
Err(exception::undef(
trace,
Some(
anyhow!(
"{}:{}/{} is not exported",
module_atom.name(),
function_atom.name(),
arity
)
.into(),
),
)
.into())
}
}
}
pub fn frame() -> Frame {
frame_for_native(NATIVE)
}
pub fn frame_for_native(native: Native) -> Frame {
Frame::new(module_function_arity(), native)
}
pub fn module_function_arity() -> ModuleFunctionArity {
ModuleFunctionArity {
module: Atom::from_str("erlang"),
function: Atom::from_str("apply"),
arity: ARITY,
}
}
pub const ARITY: Arity = 3;
pub const NATIVE: Native = Native::Three(apply_3);
pub const CLOSURE_NATIVE: Option<NonNull<std::ffi::c_void>> =
Some(unsafe { NonNull::new_unchecked(apply_3 as *mut std::ffi::c_void) });
|
//! A batteries included runtime for applications using Tokio.
//!
//! Applications using Tokio require some runtime support in order to work:
//!
//! * A [reactor] to drive I/O resources.
//! * An [executor] to execute tasks that use these I/O resources.
//! * A [timer] for scheduling work to run after a set period of time.
//!
//! While it is possible to setup each component manually, this involves a bunch
//! of boilerplate.
//!
//! [`Runtime`] bundles all of these various runtime components into a single
//! handle that can be started and shutdown together, eliminating the necessary
//! boilerplate to run a Tokio application.
//!
//! Most applications wont need to use [`Runtime`] directly. Instead, they will
//! use the [`run`] function, which uses [`Runtime`] under the hood.
//!
//! Creating a [`Runtime`] does the following:
//!
//! * Spawn a background thread running a [`Reactor`] instance.
//! * Start a [`ThreadPool`] for executing futures.
//! * Run an instance of [`Timer`] **per** thread pool worker thread.
//!
//! The thread pool uses a work-stealing strategy and is configured to start a
//! worker thread for each CPU core available on the system. This tends to be
//! the ideal setup for Tokio applications.
//!
//! A timer per thread pool worker thread is used to minimize the amount of
//! synchronization that is required for working with the timer.
//!
//! # Usage
//!
//! Most applications will use the [`run`] function. This takes a future to
//! "seed" the application, blocking the thread until the runtime becomes
//! [idle].
//!
//! ```rust
//! # extern crate tokio;
//! # extern crate futures;
//! # use futures::{Future, Stream};
//! use tokio::net::TcpListener;
//!
//! # fn process<T>(_: T) -> Box<Future<Item = (), Error = ()> + Send> {
//! # unimplemented!();
//! # }
//! # fn dox() {
//! # let addr = "127.0.0.1:8080".parse().unwrap();
//! let listener = TcpListener::bind(&addr).unwrap();
//!
//! let server = listener.incoming()
//! .map_err(|e| println!("error = {:?}", e))
//! .for_each(|socket| {
//! tokio::spawn(process(socket))
//! });
//!
//! tokio::run(server);
//! # }
//! # pub fn main() {}
//! ```
//!
//! In this function, the `run` function blocks until the runtime becomes idle.
//! See [`shutdown_on_idle`][idle] for more shutdown details.
//!
//! From within the context of the runtime, additional tasks are spawned using
//! the [`tokio::spawn`] function. Futures spawned using this function will be
//! executed on the same thread pool used by the [`Runtime`].
//!
//! A [`Runtime`] instance can also be used directly.
//!
//! ```rust
//! # extern crate tokio;
//! # extern crate futures;
//! # use futures::{Future, Stream};
//! use tokio::runtime::Runtime;
//! use tokio::net::TcpListener;
//!
//! # fn process<T>(_: T) -> Box<Future<Item = (), Error = ()> + Send> {
//! # unimplemented!();
//! # }
//! # fn dox() {
//! # let addr = "127.0.0.1:8080".parse().unwrap();
//! let listener = TcpListener::bind(&addr).unwrap();
//!
//! let server = listener.incoming()
//! .map_err(|e| println!("error = {:?}", e))
//! .for_each(|socket| {
//! tokio::spawn(process(socket))
//! });
//!
//! // Create the runtime
//! let mut rt = Runtime::new().unwrap();
//!
//! // Spawn the server task
//! rt.spawn(server);
//!
//! // Wait until the runtime becomes idle and shut it down.
//! rt.shutdown_on_idle()
//! .wait().unwrap();
//! # }
//! # pub fn main() {}
//! ```
//!
//! [reactor]: ../reactor/struct.Reactor.html
//! [executor]: https://tokio.rs/docs/getting-started/runtime-model/#executors
//! [timer]: ../timer/index.html
//! [`Runtime`]: struct.Runtime.html
//! [`Reactor`]: ../reactor/struct.Reactor.html
//! [`ThreadPool`]: https://docs.rs/tokio-threadpool/0.1/tokio_threadpool/struct.ThreadPool.html
//! [`run`]: fn.run.html
//! [idle]: struct.Runtime.html#method.shutdown_on_idle
//! [`tokio::spawn`]: ../executor/fn.spawn.html
//! [`Timer`]: https://docs.rs/tokio-timer/0.2/tokio_timer/timer/struct.Timer.html
pub mod current_thread;
mod threadpool;
pub use self::threadpool::{
Builder,
Runtime,
Shutdown,
TaskExecutor,
run,
};
|
#![feature(proc_macro_hygiene)]
#![allow(unused_variables)]
#![allow(non_snake_case)]
#![allow(unused_imports)]
mod per_frame;
mod utils;
#[skyline::main(name = "SpikesOnlyGamemode")]
pub fn main() {
per_frame::install();
}
|
use crate::error::DownloadError;
use reqwest;
use std::fs::OpenOptions;
use std::io::prelude::*;
use std::io::{SeekFrom, Write as fsWrite};
use std::sync::{Arc, RwLock};
use tokio::{self, sync::mpsc};
pub struct Write {
file: FileInfo,
offset: u64,
data: Vec<u8>,
}
#[derive(Debug, Clone)]
pub struct FileInfo {
url: String,
path: String,
create: bool
}
#[derive(Debug, Clone)]
pub struct ErrorInfo {
file: FileInfo,
error: DownloadError,
}
pub struct Results {
success: RwLock<Vec<FileInfo>>,
errors: RwLock<Vec<ErrorInfo>>,
}
pub struct Downloader {
count: usize,
max_conn: usize,
push_handle: mpsc::UnboundedSender<FileInfo>,
download_info: Arc<Results>,
}
impl Results {
fn new() -> Self {
Self {
success: RwLock::new(vec![]),
errors: RwLock::new(vec![]),
}
}
fn push_success(&self, file: FileInfo) {
self.success.write().unwrap().push(file);
}
fn push_error(&self, file: FileInfo, error: DownloadError) {
self.errors.write().unwrap().push(ErrorInfo { file, error });
}
fn get_success(&self) -> Vec<FileInfo> {
let mut ret : Vec<FileInfo> = vec![];
for file in self.success.read().unwrap().iter() {
ret.push(file.clone());
}
ret
}
fn get_err(&self) -> Vec<ErrorInfo> {
let mut ret : Vec<ErrorInfo> = vec![];
for file in self.errors.read().unwrap().iter() {
ret.push(file.clone());
}
ret
}
}
impl Downloader {
pub fn new(max_conn: Option<usize>) -> Self {
let (sx, rx) = mpsc::unbounded_channel();
let d_info = Arc::new(Results::new());
tokio::spawn(Self::start_download(rx, d_info.clone()));
Downloader {
count: 0,
max_conn: max_conn.unwrap_or(10),
push_handle: sx,
download_info: d_info.clone(),
}
}
pub fn enque_file(&mut self, url: String, path: String, create: bool) -> Result<(), DownloadError> {
if self.count == self.max_conn {
eprintln!("limit reached");
return Err(DownloadError::EnqueError("Limit Reached".to_string()));
}
self.count += 1;
let sx = self.push_handle.clone();
tokio::spawn(async move {
match sx.send(FileInfo {
url,
path,
create
}) {
Ok(_) => Ok(()),
Err(_) => {
let err = format!("Could not send over mpsc channel");
Err(DownloadError::EnqueError(err))
}
}
});
Ok(())
}
pub fn get_err(&self) -> Vec<ErrorInfo> {
self.download_info.get_err()
}
pub fn get_success(&self) -> Vec<FileInfo> {
self.download_info.get_success()
}
pub async fn start_download(
mut reciever: mpsc::UnboundedReceiver<FileInfo>,
d_info: Arc<Results>,
) -> Result<(), DownloadError> {
let (wsx, wrx) = mpsc::unbounded_channel();
tokio::spawn(Self::writer(wrx, d_info.clone()));
loop {
let file = reciever.recv().await.expect("Sender end destroyed, maybe t went out of scope");
let write_push_handle = wsx.clone();
let d_info = d_info.clone();
let task = async move {
match Self::ind_down(file.clone(), write_push_handle).await {
Ok(_) => d_info.push_success(file),
Err(e) => d_info.push_error(file.clone(), e),
}
};
tokio::spawn(task);
}
}
async fn ind_down(
file: FileInfo,
writer: mpsc::UnboundedSender<Write>,
) -> Result<(), DownloadError> {
let mut res = reqwest::get(&file.url).await?;
let mut written = 0;
while let Some(chunk) = res.chunk().await? {
let file = file.clone();
match writer.send(Write {
file,
offset: written,
data: chunk.to_vec(),
}) {
Ok(_) => {}
Err(_) => {
let e = DownloadError::EnqueError("Cannot send to writer".to_string());
return Err(e);
}
}
written += chunk.len() as u64;
}
Ok(())
}
pub async fn writer(
mut reciever: mpsc::UnboundedReceiver<Write>,
d_info: Arc<Results>,
) -> Result<(), DownloadError> {
loop {
let write = reciever.recv().await;
let write = write.unwrap();
let file = write.file.clone();
let d_info =d_info.clone();
tokio::task::spawn_blocking(move || match Self::ind_writer(write) {
Ok(_) => {}
Err(e) => d_info.push_error(file, e)
});
}
}
fn ind_writer(write: Write) -> Result<(), DownloadError> {
let mut f = OpenOptions::new()
.write(true)
.create(write.file.create)
.open(write.file.path)?;
f.seek(SeekFrom::Start(write.offset))?;
f.write(&write.data)?;
Ok(())
}
}
|
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn BstrFromVector ( psa : *const super::Com:: SAFEARRAY , pbstr : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn ClearCustData ( pcustdata : *mut super::Com:: CUSTDATA ) -> ( ) );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn CreateDispTypeInfo ( pidata : *mut INTERFACEDATA , lcid : u32 , pptinfo : *mut super::Com:: ITypeInfo ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn CreateErrorInfo ( pperrinfo : *mut ICreateErrorInfo ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn CreateOleAdviseHolder ( ppoaholder : *mut IOleAdviseHolder ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn CreateStdDispatch ( punkouter : ::windows_sys::core::IUnknown , pvthis : *mut ::core::ffi::c_void , ptinfo : super::Com:: ITypeInfo , ppunkstddisp : *mut ::windows_sys::core::IUnknown ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn CreateTypeLib ( syskind : super::Com:: SYSKIND , szfile : ::windows_sys::core::PCWSTR , ppctlib : *mut ICreateTypeLib ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn CreateTypeLib2 ( syskind : super::Com:: SYSKIND , szfile : ::windows_sys::core::PCWSTR , ppctlib : *mut ICreateTypeLib2 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn DispCallFunc ( pvinstance : *const ::core::ffi::c_void , ovft : usize , cc : super::Com:: CALLCONV , vtreturn : super::Com:: VARENUM , cactuals : u32 , prgvt : *const u16 , prgpvarg : *const *const super::Com:: VARIANT , pvargresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn DispGetIDsOfNames ( ptinfo : super::Com:: ITypeInfo , rgsznames : *const ::windows_sys::core::PCWSTR , cnames : u32 , rgdispid : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn DispGetParam ( pdispparams : *const super::Com:: DISPPARAMS , position : u32 , vttarg : super::Com:: VARENUM , pvarresult : *mut super::Com:: VARIANT , puargerr : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn DispInvoke ( _this : *mut ::core::ffi::c_void , ptinfo : super::Com:: ITypeInfo , dispidmember : i32 , wflags : u16 , pparams : *mut super::Com:: DISPPARAMS , pvarresult : *mut super::Com:: VARIANT , pexcepinfo : *mut super::Com:: EXCEPINFO , puargerr : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn DoDragDrop ( pdataobj : super::Com:: IDataObject , pdropsource : IDropSource , dwokeffects : DROPEFFECT , pdweffect : *mut DROPEFFECT ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn DosDateTimeToVariantTime ( wdosdate : u16 , wdostime : u16 , pvtime : *mut f64 ) -> i32 );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn GetActiveObject ( rclsid : *const ::windows_sys::core::GUID , pvreserved : *mut ::core::ffi::c_void , ppunk : *mut ::windows_sys::core::IUnknown ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn GetAltMonthNames ( lcid : u32 , prgp : *mut *mut ::windows_sys::core::PWSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn GetRecordInfoFromGuids ( rguidtypelib : *const ::windows_sys::core::GUID , uvermajor : u32 , uverminor : u32 , lcid : u32 , rguidtypeinfo : *const ::windows_sys::core::GUID , pprecinfo : *mut IRecordInfo ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn GetRecordInfoFromTypeInfo ( ptypeinfo : super::Com:: ITypeInfo , pprecinfo : *mut IRecordInfo ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserFree ( param0 : *const u32 , param1 : *const super::super::Graphics::Gdi:: HRGN ) -> ( ) );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "api-ms-win-core-marshal-l1-1-0.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserFree64 ( param0 : *const u32 , param1 : *const super::super::Graphics::Gdi:: HRGN ) -> ( ) );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserMarshal ( param0 : *const u32 , param1 : *mut u8 , param2 : *const super::super::Graphics::Gdi:: HRGN ) -> *mut u8 );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "api-ms-win-core-marshal-l1-1-0.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserMarshal64 ( param0 : *const u32 , param1 : *mut u8 , param2 : *const super::super::Graphics::Gdi:: HRGN ) -> *mut u8 );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserSize ( param0 : *const u32 , param1 : u32 , param2 : *const super::super::Graphics::Gdi:: HRGN ) -> u32 );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "api-ms-win-core-marshal-l1-1-0.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserSize64 ( param0 : *const u32 , param1 : u32 , param2 : *const super::super::Graphics::Gdi:: HRGN ) -> u32 );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserUnmarshal ( param0 : *const u32 , param1 : *const u8 , param2 : *mut super::super::Graphics::Gdi:: HRGN ) -> *mut u8 );
#[cfg(feature = "Win32_Graphics_Gdi")]
::windows_targets::link ! ( "api-ms-win-core-marshal-l1-1-0.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`*"] fn HRGN_UserUnmarshal64 ( param0 : *const u32 , param1 : *const u8 , param2 : *mut super::super::Graphics::Gdi:: HRGN ) -> *mut u8 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn IsAccelerator ( haccel : super::super::UI::WindowsAndMessaging:: HACCEL , caccelentries : i32 , lpmsg : *const super::super::UI::WindowsAndMessaging:: MSG , lpwcmd : *mut u16 ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn LHashValOfNameSys ( syskind : super::Com:: SYSKIND , lcid : u32 , szname : ::windows_sys::core::PCWSTR ) -> u32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn LHashValOfNameSysA ( syskind : super::Com:: SYSKIND , lcid : u32 , szname : ::windows_sys::core::PCSTR ) -> u32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn LoadRegTypeLib ( rguid : *const ::windows_sys::core::GUID , wvermajor : u16 , wverminor : u16 , lcid : u32 , pptlib : *mut super::Com:: ITypeLib ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn LoadTypeLib ( szfile : ::windows_sys::core::PCWSTR , pptlib : *mut super::Com:: ITypeLib ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn LoadTypeLibEx ( szfile : ::windows_sys::core::PCWSTR , regkind : REGKIND , pptlib : *mut super::Com:: ITypeLib ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OaBuildVersion ( ) -> u32 );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OaEnablePerUserTLibRegistration ( ) -> ( ) );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleBuildVersion ( ) -> u32 );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreate ( rclsid : *const ::windows_sys::core::GUID , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , pformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleCreateDefaultHandler ( clsid : *const ::windows_sys::core::GUID , punkouter : ::windows_sys::core::IUnknown , riid : *const ::windows_sys::core::GUID , lplpobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleCreateEmbeddingHelper ( clsid : *const ::windows_sys::core::GUID , punkouter : ::windows_sys::core::IUnknown , flags : EMBDHLP_FLAGS , pcf : super::Com:: IClassFactory , riid : *const ::windows_sys::core::GUID , lplpobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateEx ( rclsid : *const ::windows_sys::core::GUID , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleCreateFontIndirect ( lpfontdesc : *const FONTDESC , riid : *const ::windows_sys::core::GUID , lplpvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateFromData ( psrcdataobj : super::Com:: IDataObject , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , pformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateFromDataEx ( psrcdataobj : super::Com:: IDataObject , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateFromFile ( rclsid : *const ::windows_sys::core::GUID , lpszfilename : ::windows_sys::core::PCWSTR , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , lpformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateFromFileEx ( rclsid : *const ::windows_sys::core::GUID , lpszfilename : ::windows_sys::core::PCWSTR , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLink ( pmklinksrc : super::Com:: IMoniker , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , lpformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLinkEx ( pmklinksrc : super::Com:: IMoniker , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLinkFromData ( psrcdataobj : super::Com:: IDataObject , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , pformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLinkFromDataEx ( psrcdataobj : super::Com:: IDataObject , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLinkToFile ( lpszfilename : ::windows_sys::core::PCWSTR , riid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , lpformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateLinkToFileEx ( lpszfilename : ::windows_sys::core::PCWSTR , riid : *const ::windows_sys::core::GUID , dwflags : OLECREATE , renderopt : OLERENDER , cformats : u32 , rgadvf : *const u32 , rgformatetc : *const super::Com:: FORMATETC , lpadvisesink : super::Com:: IAdviseSink , rgdwconnection : *mut u32 , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleCreateMenuDescriptor ( hmenucombined : super::super::UI::WindowsAndMessaging:: HMENU , lpmenuwidths : *const OLEMENUGROUPWIDTHS ) -> isize );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleCreatePictureIndirect ( lppictdesc : *const PICTDESC , riid : *const ::windows_sys::core::GUID , fown : super::super::Foundation:: BOOL , lplpvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleCreatePropertyFrame ( hwndowner : super::super::Foundation:: HWND , x : u32 , y : u32 , lpszcaption : ::windows_sys::core::PCWSTR , cobjects : u32 , ppunk : *const ::windows_sys::core::IUnknown , cpages : u32 , ppageclsid : *const ::windows_sys::core::GUID , lcid : u32 , dwreserved : u32 , pvreserved : *const ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleCreatePropertyFrameIndirect ( lpparams : *const OCPFIPARAMS ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleCreateStaticFromData ( psrcdataobj : super::Com:: IDataObject , iid : *const ::windows_sys::core::GUID , renderopt : OLERENDER , pformatetc : *const super::Com:: FORMATETC , pclientsite : IOleClientSite , pstg : super::Com::StructuredStorage:: IStorage , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleDestroyMenuDescriptor ( holemenu : isize ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleDoAutoConvert ( pstg : super::Com::StructuredStorage:: IStorage , pclsidnew : *mut ::windows_sys::core::GUID ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] fn OleDraw ( punknown : ::windows_sys::core::IUnknown , dwaspect : u32 , hdcdraw : super::super::Graphics::Gdi:: HDC , lprcbounds : *const super::super::Foundation:: RECT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Memory"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Memory\"`*"] fn OleDuplicateData ( hsrc : super::super::Foundation:: HANDLE , cfformat : CLIPBOARD_FORMAT , uiflags : super::Memory:: GLOBAL_ALLOC_FLAGS ) -> super::super::Foundation:: HANDLE );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleFlushClipboard ( ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleGetAutoConvert ( clsidold : *const ::windows_sys::core::GUID , pclsidnew : *mut ::windows_sys::core::GUID ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleGetClipboard ( ppdataobj : *mut super::Com:: IDataObject ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleGetClipboardWithEnterpriseInfo ( dataobject : *mut super::Com:: IDataObject , dataenterpriseid : *mut ::windows_sys::core::PWSTR , sourcedescription : *mut ::windows_sys::core::PWSTR , targetdescription : *mut ::windows_sys::core::PWSTR , datadescription : *mut ::windows_sys::core::PWSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleGetIconOfClass ( rclsid : *const ::windows_sys::core::GUID , lpszlabel : ::windows_sys::core::PCWSTR , fusetypeaslabel : super::super::Foundation:: BOOL ) -> super::super::Foundation:: HGLOBAL );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleGetIconOfFile ( lpszpath : ::windows_sys::core::PCWSTR , fusefileaslabel : super::super::Foundation:: BOOL ) -> super::super::Foundation:: HGLOBAL );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleIconToCursor ( hinstexe : super::super::Foundation:: HMODULE , hicon : super::super::UI::WindowsAndMessaging:: HICON ) -> super::super::UI::WindowsAndMessaging:: HCURSOR );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleInitialize ( pvreserved : *const ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleIsCurrentClipboard ( pdataobj : super::Com:: IDataObject ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleIsRunning ( pobject : IOleObject ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_System_Com_StructuredStorage")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleLoad ( pstg : super::Com::StructuredStorage:: IStorage , riid : *const ::windows_sys::core::GUID , pclientsite : IOleClientSite , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleLoadFromStream ( pstm : super::Com:: IStream , iidinterface : *const ::windows_sys::core::GUID , ppvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleLoadPicture ( lpstream : super::Com:: IStream , lsize : i32 , frunmode : super::super::Foundation:: BOOL , riid : *const ::windows_sys::core::GUID , lplpvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleLoadPictureEx ( lpstream : super::Com:: IStream , lsize : i32 , frunmode : super::super::Foundation:: BOOL , riid : *const ::windows_sys::core::GUID , xsizedesired : u32 , ysizedesired : u32 , dwflags : LOAD_PICTURE_FLAGS , lplpvobj : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleLoadPictureFile ( varfilename : super::Com:: VARIANT , lplpdisppicture : *mut super::Com:: IDispatch ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleLoadPictureFileEx ( varfilename : super::Com:: VARIANT , xsizedesired : u32 , ysizedesired : u32 , dwflags : LOAD_PICTURE_FLAGS , lplpdisppicture : *mut super::Com:: IDispatch ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleLoadPicturePath ( szurlorpath : ::windows_sys::core::PCWSTR , punkcaller : ::windows_sys::core::IUnknown , dwreserved : u32 , clrreserved : u32 , riid : *const ::windows_sys::core::GUID , ppvret : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleLockRunning ( punknown : ::windows_sys::core::IUnknown , flock : super::super::Foundation:: BOOL , flastunlockcloses : super::super::Foundation:: BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleMetafilePictFromIconAndLabel ( hicon : super::super::UI::WindowsAndMessaging:: HICON , lpszlabel : ::windows_sys::core::PCWSTR , lpszsourcefile : ::windows_sys::core::PCWSTR , iiconindex : u32 ) -> super::super::Foundation:: HGLOBAL );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleNoteObjectVisible ( punknown : ::windows_sys::core::IUnknown , fvisible : super::super::Foundation:: BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleQueryCreateFromData ( psrcdataobject : super::Com:: IDataObject ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleQueryLinkFromData ( psrcdataobject : super::Com:: IDataObject ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleRegEnumFormatEtc ( clsid : *const ::windows_sys::core::GUID , dwdirection : u32 , ppenum : *mut super::Com:: IEnumFORMATETC ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleRegEnumVerbs ( clsid : *const ::windows_sys::core::GUID , ppenum : *mut IEnumOLEVERB ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleRegGetMiscStatus ( clsid : *const ::windows_sys::core::GUID , dwaspect : u32 , pdwstatus : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleRegGetUserType ( clsid : *const ::windows_sys::core::GUID , dwformoftype : USERCLASSTYPE , pszusertype : *mut ::windows_sys::core::PWSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleRun ( punknown : ::windows_sys::core::IUnknown ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleSave ( pps : super::Com::StructuredStorage:: IPersistStorage , pstg : super::Com::StructuredStorage:: IStorage , fsameasload : super::super::Foundation:: BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleSavePictureFile ( lpdisppicture : super::Com:: IDispatch , bstrfilename : ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleSaveToStream ( ppstm : super::Com:: IPersistStream , pstm : super::Com:: IStream ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleSetAutoConvert ( clsidold : *const ::windows_sys::core::GUID , clsidnew : *const ::windows_sys::core::GUID ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn OleSetClipboard ( pdataobj : super::Com:: IDataObject ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleSetContainedObject ( punknown : ::windows_sys::core::IUnknown , fcontained : super::super::Foundation:: BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleSetMenuDescriptor ( holemenu : isize , hwndframe : super::super::Foundation:: HWND , hwndactiveobject : super::super::Foundation:: HWND , lpframe : IOleInPlaceFrame , lpactiveobj : IOleInPlaceActiveObject ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleTranslateAccelerator ( lpframe : IOleInPlaceFrame , lpframeinfo : *const OLEINPLACEFRAMEINFO , lpmsg : *const super::super::UI::WindowsAndMessaging:: MSG ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] fn OleTranslateColor ( clr : u32 , hpal : super::super::Graphics::Gdi:: HPALETTE , lpcolorref : *mut super::super::Foundation:: COLORREF ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleUIAddVerbMenuA ( lpoleobj : IOleObject , lpszshorttype : ::windows_sys::core::PCSTR , hmenu : super::super::UI::WindowsAndMessaging:: HMENU , upos : u32 , uidverbmin : u32 , uidverbmax : u32 , baddconvert : super::super::Foundation:: BOOL , idconvert : u32 , lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU ) -> super::super::Foundation:: BOOL );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleUIAddVerbMenuW ( lpoleobj : IOleObject , lpszshorttype : ::windows_sys::core::PCWSTR , hmenu : super::super::UI::WindowsAndMessaging:: HMENU , upos : u32 , uidverbmin : u32 , uidverbmax : u32 , baddconvert : super::super::Foundation:: BOOL , idconvert : u32 , lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU ) -> super::super::Foundation:: BOOL );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Media\"`*"] fn OleUIBusyA ( param0 : *const OLEUIBUSYA ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Media\"`*"] fn OleUIBusyW ( param0 : *const OLEUIBUSYW ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUICanConvertOrActivateAs ( rclsid : *const ::windows_sys::core::GUID , fislinkedobject : super::super::Foundation:: BOOL , wformat : u16 ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIChangeIconA ( param0 : *const OLEUICHANGEICONA ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIChangeIconW ( param0 : *const OLEUICHANGEICONW ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls_Dialogs\"`*"] fn OleUIChangeSourceA ( param0 : *const OLEUICHANGESOURCEA ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls_Dialogs\"`*"] fn OleUIChangeSourceW ( param0 : *const OLEUICHANGESOURCEW ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIConvertA ( param0 : *const OLEUICONVERTA ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIConvertW ( param0 : *const OLEUICONVERTW ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIEditLinksA ( param0 : *const OLEUIEDITLINKSA ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIEditLinksW ( param0 : *const OLEUIEDITLINKSW ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleUIInsertObjectA ( param0 : *const OLEUIINSERTOBJECTA ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn OleUIInsertObjectW ( param0 : *const OLEUIINSERTOBJECTW ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleUIObjectPropertiesA ( param0 : *const OLEUIOBJECTPROPSA ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] fn OleUIObjectPropertiesW ( param0 : *const OLEUIOBJECTPROPSW ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleUIPasteSpecialA ( param0 : *const OLEUIPASTESPECIALA ) -> u32 );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn OleUIPasteSpecialW ( param0 : *const OLEUIPASTESPECIALW ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""cdecl" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIPromptUserA ( ntemplate : i32 , hwndparent : super::super::Foundation:: HWND ) -> i32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""cdecl" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIPromptUserW ( ntemplate : i32 , hwndparent : super::super::Foundation:: HWND ) -> i32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIUpdateLinksA ( lpoleuilinkcntr : IOleUILinkContainerA , hwndparent : super::super::Foundation:: HWND , lpsztitle : ::windows_sys::core::PCSTR , clinks : i32 ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oledlg.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn OleUIUpdateLinksW ( lpoleuilinkcntr : IOleUILinkContainerW , hwndparent : super::super::Foundation:: HWND , lpsztitle : ::windows_sys::core::PCWSTR , clinks : i32 ) -> super::super::Foundation:: BOOL );
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn OleUninitialize ( ) -> ( ) );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn QueryPathOfRegTypeLib ( guid : *const ::windows_sys::core::GUID , wmaj : u16 , wmin : u16 , lcid : u32 , lpbstrpathname : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn RegisterActiveObject ( punk : ::windows_sys::core::IUnknown , rclsid : *const ::windows_sys::core::GUID , dwflags : ACTIVEOBJECT_FLAGS , pdwregister : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn RegisterDragDrop ( hwnd : super::super::Foundation:: HWND , pdroptarget : IDropTarget ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn RegisterTypeLib ( ptlib : super::Com:: ITypeLib , szfullpath : ::windows_sys::core::PCWSTR , szhelpdir : ::windows_sys::core::PCWSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn RegisterTypeLibForUser ( ptlib : super::Com:: ITypeLib , szfullpath : ::windows_sys::core::PCWSTR , szhelpdir : ::windows_sys::core::PCWSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_System_Com_StructuredStorage\"`*"] fn ReleaseStgMedium ( param0 : *mut super::Com:: STGMEDIUM ) -> ( ) );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn RevokeActiveObject ( dwregister : u32 , pvreserved : *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "ole32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn RevokeDragDrop ( hwnd : super::super::Foundation:: HWND ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayAccessData ( psa : *const super::Com:: SAFEARRAY , ppvdata : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayAddRef ( psa : *const super::Com:: SAFEARRAY , ppdatatorelease : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayAllocData ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayAllocDescriptor ( cdims : u32 , ppsaout : *mut *mut super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayAllocDescriptorEx ( vt : super::Com:: VARENUM , cdims : u32 , ppsaout : *mut *mut super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCopy ( psa : *const super::Com:: SAFEARRAY , ppsaout : *mut *mut super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCopyData ( psasource : *const super::Com:: SAFEARRAY , psatarget : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCreate ( vt : super::Com:: VARENUM , cdims : u32 , rgsabound : *const super::Com:: SAFEARRAYBOUND ) -> *mut super::Com:: SAFEARRAY );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCreateEx ( vt : super::Com:: VARENUM , cdims : u32 , rgsabound : *const super::Com:: SAFEARRAYBOUND , pvextra : *const ::core::ffi::c_void ) -> *mut super::Com:: SAFEARRAY );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCreateVector ( vt : super::Com:: VARENUM , llbound : i32 , celements : u32 ) -> *mut super::Com:: SAFEARRAY );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayCreateVectorEx ( vt : super::Com:: VARENUM , llbound : i32 , celements : u32 , pvextra : *const ::core::ffi::c_void ) -> *mut super::Com:: SAFEARRAY );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayDestroy ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayDestroyData ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayDestroyDescriptor ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetDim ( psa : *const super::Com:: SAFEARRAY ) -> u32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetElement ( psa : *const super::Com:: SAFEARRAY , rgindices : *const i32 , pv : *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetElemsize ( psa : *const super::Com:: SAFEARRAY ) -> u32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetIID ( psa : *const super::Com:: SAFEARRAY , pguid : *mut ::windows_sys::core::GUID ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetLBound ( psa : *const super::Com:: SAFEARRAY , ndim : u32 , pllbound : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetRecordInfo ( psa : *const super::Com:: SAFEARRAY , prinfo : *mut IRecordInfo ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetUBound ( psa : *const super::Com:: SAFEARRAY , ndim : u32 , plubound : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayGetVartype ( psa : *const super::Com:: SAFEARRAY , pvt : *mut super::Com:: VARENUM ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayLock ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayPtrOfIndex ( psa : *const super::Com:: SAFEARRAY , rgindices : *const i32 , ppvdata : *mut *mut ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayPutElement ( psa : *const super::Com:: SAFEARRAY , rgindices : *const i32 , pv : *const ::core::ffi::c_void ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayRedim ( psa : *mut super::Com:: SAFEARRAY , psaboundnew : *const super::Com:: SAFEARRAYBOUND ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn SafeArrayReleaseData ( pdata : *const ::core::ffi::c_void ) -> ( ) );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayReleaseDescriptor ( psa : *const super::Com:: SAFEARRAY ) -> ( ) );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArraySetIID ( psa : *const super::Com:: SAFEARRAY , guid : *const ::windows_sys::core::GUID ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArraySetRecordInfo ( psa : *const super::Com:: SAFEARRAY , prinfo : IRecordInfo ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayUnaccessData ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn SafeArrayUnlock ( psa : *const super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn SystemTimeToVariantTime ( lpsystemtime : *const super::super::Foundation:: SYSTEMTIME , pvtime : *mut f64 ) -> i32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn UnRegisterTypeLib ( libid : *const ::windows_sys::core::GUID , wvermajor : u16 , wverminor : u16 , lcid : u32 , syskind : super::Com:: SYSKIND ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn UnRegisterTypeLibForUser ( libid : *const ::windows_sys::core::GUID , wmajorvernum : u16 , wminorvernum : u16 , lcid : u32 , syskind : super::Com:: SYSKIND ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarAbs ( pvarin : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarAdd ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarAnd ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarBoolFromCy ( cyin : super::Com:: CY , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromDate ( datein : f64 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarBoolFromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromI1 ( cin : u8 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromI2 ( sin : i16 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromI4 ( lin : i32 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromI8 ( i64in : i64 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromR4 ( fltin : f32 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromR8 ( dblin : f64 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromUI1 ( bin : u8 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromUI2 ( uiin : u16 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromUI4 ( ulin : u32 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBoolFromUI8 ( i64in : u64 , pboolout : *mut super::super::Foundation:: VARIANT_BOOL ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrCat ( bstrleft : ::windows_sys::core::BSTR , bstrright : ::windows_sys::core::BSTR , pbstrresult : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrCmp ( bstrleft : ::windows_sys::core::BSTR , bstrright : ::windows_sys::core::BSTR , lcid : u32 , dwflags : u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBstrFromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarBstrFromCy ( cyin : super::Com:: CY , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromDate ( datein : f64 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarBstrFromDec ( pdecin : *const super::super::Foundation:: DECIMAL , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarBstrFromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromI1 ( cin : u8 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromI2 ( ival : i16 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromI4 ( lin : i32 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromI8 ( i64in : i64 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromR4 ( fltin : f32 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromR8 ( dblin : f64 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromUI1 ( bval : u8 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromUI2 ( uiin : u16 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromUI4 ( ulin : u32 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarBstrFromUI8 ( ui64in : u64 , lcid : u32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarCat ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarCmp ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , lcid : u32 , dwflags : u32 ) -> VARCMP );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyAbs ( cyin : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyAdd ( cyleft : super::Com:: CY , cyright : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyCmp ( cyleft : super::Com:: CY , cyright : super::Com:: CY ) -> VARCMP );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyCmpR8 ( cyleft : super::Com:: CY , dblright : f64 ) -> VARCMP );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFix ( cyin : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarCyFromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromDate ( datein : f64 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarCyFromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromI1 ( cin : u8 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromI2 ( sin : i16 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromI4 ( lin : i32 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromI8 ( i64in : i64 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromR4 ( fltin : f32 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromR8 ( dblin : f64 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromUI1 ( bin : u8 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromUI2 ( uiin : u16 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromUI4 ( ulin : u32 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyFromUI8 ( ui64in : u64 , pcyout : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyInt ( cyin : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyMul ( cyleft : super::Com:: CY , cyright : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyMulI4 ( cyleft : super::Com:: CY , lright : i32 , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyMulI8 ( cyleft : super::Com:: CY , lright : i64 , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyNeg ( cyin : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCyRound ( cyin : super::Com:: CY , cdecimals : i32 , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarCySub ( cyleft : super::Com:: CY , cyright : super::Com:: CY , pcyresult : *mut super::Com:: CY ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDateFromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarDateFromCy ( cyin : super::Com:: CY , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDateFromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarDateFromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromI1 ( cin : u8 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromI2 ( sin : i16 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromI4 ( lin : i32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromI8 ( i64in : i64 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromR4 ( fltin : f32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromR8 ( dblin : f64 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromUI1 ( bin : u8 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromUI2 ( uiin : u16 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromUI4 ( ulin : u32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarDateFromUI8 ( ui64in : u64 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDateFromUdate ( pudatein : *const UDATE , dwflags : u32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDateFromUdateEx ( pudatein : *const UDATE , lcid : u32 , dwflags : u32 , pdateout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecAbs ( pdecin : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecAdd ( pdecleft : *const super::super::Foundation:: DECIMAL , pdecright : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecCmp ( pdecleft : *const super::super::Foundation:: DECIMAL , pdecright : *const super::super::Foundation:: DECIMAL ) -> VARCMP );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecCmpR8 ( pdecleft : *const super::super::Foundation:: DECIMAL , dblright : f64 ) -> VARCMP );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecDiv ( pdecleft : *const super::super::Foundation:: DECIMAL , pdecright : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFix ( pdecin : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarDecFromCy ( cyin : super::Com:: CY , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromDate ( datein : f64 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarDecFromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromI1 ( cin : u8 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromI2 ( uiin : i16 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromI4 ( lin : i32 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromI8 ( i64in : i64 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromR4 ( fltin : f32 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromR8 ( dblin : f64 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromUI1 ( bin : u8 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromUI2 ( uiin : u16 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromUI4 ( ulin : u32 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecFromUI8 ( ui64in : u64 , pdecout : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecInt ( pdecin : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecMul ( pdecleft : *const super::super::Foundation:: DECIMAL , pdecright : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecNeg ( pdecin : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecRound ( pdecin : *const super::super::Foundation:: DECIMAL , cdecimals : i32 , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarDecSub ( pdecleft : *const super::super::Foundation:: DECIMAL , pdecright : *const super::super::Foundation:: DECIMAL , pdecresult : *mut super::super::Foundation:: DECIMAL ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarDiv ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarEqv ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFix ( pvarin : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormat ( pvarin : *const super::Com:: VARIANT , pstrformat : ::windows_sys::core::PCWSTR , ifirstday : VARFORMAT_FIRST_DAY , ifirstweek : VARFORMAT_FIRST_WEEK , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormatCurrency ( pvarin : *const super::Com:: VARIANT , inumdig : i32 , iinclead : i32 , iuseparens : i32 , igroup : i32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormatDateTime ( pvarin : *const super::Com:: VARIANT , inamedformat : VARFORMAT_NAMED_FORMAT , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormatFromTokens ( pvarin : *const super::Com:: VARIANT , pstrformat : ::windows_sys::core::PCWSTR , pbtokcur : *const u8 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR , lcid : u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormatNumber ( pvarin : *const super::Com:: VARIANT , inumdig : i32 , iinclead : VARFORMAT_LEADING_DIGIT , iuseparens : VARFORMAT_PARENTHESES , igroup : VARFORMAT_GROUP , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarFormatPercent ( pvarin : *const super::Com:: VARIANT , inumdig : i32 , iinclead : VARFORMAT_LEADING_DIGIT , iuseparens : VARFORMAT_PARENTHESES , igroup : VARFORMAT_GROUP , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI1FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI1FromCy ( cyin : super::Com:: CY , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromDate ( datein : f64 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI1FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI1FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromI2 ( uiin : i16 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromI4 ( lin : i32 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromI8 ( i64in : i64 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromR4 ( fltin : f32 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromR8 ( dblin : f64 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromUI1 ( bin : u8 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromUI2 ( uiin : u16 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromUI4 ( ulin : u32 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI1FromUI8 ( i64in : u64 , pcout : ::windows_sys::core::PSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI2FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI2FromCy ( cyin : super::Com:: CY , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromDate ( datein : f64 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI2FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI2FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromI1 ( cin : u8 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromI4 ( lin : i32 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromI8 ( i64in : i64 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromR4 ( fltin : f32 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromR8 ( dblin : f64 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromUI1 ( bin : u8 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromUI2 ( uiin : u16 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromUI4 ( ulin : u32 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI2FromUI8 ( ui64in : u64 , psout : *mut i16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI4FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI4FromCy ( cyin : super::Com:: CY , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromDate ( datein : f64 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI4FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI4FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromI1 ( cin : u8 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromI2 ( sin : i16 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromI8 ( i64in : i64 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromR4 ( fltin : f32 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromR8 ( dblin : f64 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromUI1 ( bin : u8 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromUI2 ( uiin : u16 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromUI4 ( ulin : u32 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI4FromUI8 ( ui64in : u64 , plout : *mut i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI8FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI8FromCy ( cyin : super::Com:: CY , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromDate ( datein : f64 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarI8FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarI8FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromI1 ( cin : u8 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromI2 ( sin : i16 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromR4 ( fltin : f32 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromR8 ( dblin : f64 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromUI1 ( bin : u8 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromUI2 ( uiin : u16 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromUI4 ( ulin : u32 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarI8FromUI8 ( ui64in : u64 , pi64out : *mut i64 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarIdiv ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarImp ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarInt ( pvarin : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarMod ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarMonthName ( imonth : i32 , fabbrev : i32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarMul ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarNeg ( pvarin : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarNot ( pvarin : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarNumFromParseNum ( pnumprs : *const NUMPARSE , rgbdig : *const u8 , dwvtbits : u32 , pvar : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarOr ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarParseNumFromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pnumprs : *mut NUMPARSE , rgbdig : *mut u8 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarPow ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4CmpR8 ( fltleft : f32 , dblright : f64 ) -> VARCMP );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarR4FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarR4FromCy ( cyin : super::Com:: CY , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromDate ( datein : f64 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarR4FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarR4FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromI1 ( cin : u8 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromI2 ( sin : i16 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromI4 ( lin : i32 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromI8 ( i64in : i64 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromR8 ( dblin : f64 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromUI1 ( bin : u8 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromUI2 ( uiin : u16 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromUI4 ( ulin : u32 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR4FromUI8 ( ui64in : u64 , pfltout : *mut f32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarR8FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarR8FromCy ( cyin : super::Com:: CY , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromDate ( datein : f64 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarR8FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarR8FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromI1 ( cin : u8 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromI2 ( sin : i16 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromI4 ( lin : i32 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromI8 ( i64in : i64 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromR4 ( fltin : f32 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromUI1 ( bin : u8 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromUI2 ( uiin : u16 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromUI4 ( ulin : u32 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8FromUI8 ( ui64in : u64 , pdblout : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8Pow ( dblleft : f64 , dblright : f64 , pdblresult : *mut f64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarR8Round ( dblin : f64 , cdecimals : i32 , pdblresult : *mut f64 ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarRound ( pvarin : *const super::Com:: VARIANT , cdecimals : i32 , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarSub ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarTokenizeFormatString ( pstrformat : ::windows_sys::core::PCWSTR , rgbtok : *mut u8 , cbtok : i32 , ifirstday : VARFORMAT_FIRST_DAY , ifirstweek : VARFORMAT_FIRST_WEEK , lcid : u32 , pcbactual : *const i32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI1FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI1FromCy ( cyin : super::Com:: CY , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromDate ( datein : f64 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI1FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI1FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromI1 ( cin : u8 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromI2 ( sin : i16 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromI4 ( lin : i32 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromI8 ( i64in : i64 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromR4 ( fltin : f32 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromR8 ( dblin : f64 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromUI2 ( uiin : u16 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromUI4 ( ulin : u32 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI1FromUI8 ( ui64in : u64 , pbout : *mut u8 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI2FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI2FromCy ( cyin : super::Com:: CY , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromDate ( datein : f64 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI2FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI2FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromI1 ( cin : u8 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromI2 ( uiin : i16 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromI4 ( lin : i32 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromI8 ( i64in : i64 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromR4 ( fltin : f32 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromR8 ( dblin : f64 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromUI1 ( bin : u8 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromUI4 ( ulin : u32 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI2FromUI8 ( i64in : u64 , puiout : *mut u16 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI4FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI4FromCy ( cyin : super::Com:: CY , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromDate ( datein : f64 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI4FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI4FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromI1 ( cin : u8 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromI2 ( uiin : i16 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromI4 ( lin : i32 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromI8 ( i64in : i64 , plout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromR4 ( fltin : f32 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromR8 ( dblin : f64 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromUI1 ( bin : u8 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromUI2 ( uiin : u16 , pulout : *mut u32 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI4FromUI8 ( ui64in : u64 , plout : *mut u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI8FromBool ( boolin : super::super::Foundation:: VARIANT_BOOL , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI8FromCy ( cyin : super::Com:: CY , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromDate ( datein : f64 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUI8FromDec ( pdecin : *const super::super::Foundation:: DECIMAL , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VarUI8FromDisp ( pdispin : super::Com:: IDispatch , lcid : u32 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromI1 ( cin : u8 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromI2 ( sin : i16 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromI8 ( ui64in : i64 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromR4 ( fltin : f32 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromR8 ( dblin : f64 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromStr ( strin : ::windows_sys::core::PCWSTR , lcid : u32 , dwflags : u32 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromUI1 ( bin : u8 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromUI2 ( uiin : u16 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarUI8FromUI4 ( ulin : u32 , pi64out : *mut u64 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VarUdateFromDate ( datein : f64 , dwflags : u32 , pudateout : *mut UDATE ) -> ::windows_sys::core::HRESULT );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VarWeekdayName ( iweekday : i32 , fabbrev : i32 , ifirstday : i32 , dwflags : u32 , pbstrout : *mut ::windows_sys::core::BSTR ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VarXor ( pvarleft : *const super::Com:: VARIANT , pvarright : *const super::Com:: VARIANT , pvarresult : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantChangeType ( pvargdest : *mut super::Com:: VARIANT , pvarsrc : *const super::Com:: VARIANT , wflags : u16 , vt : super::Com:: VARENUM ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantChangeTypeEx ( pvargdest : *mut super::Com:: VARIANT , pvarsrc : *const super::Com:: VARIANT , lcid : u32 , wflags : u16 , vt : super::Com:: VARENUM ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantClear ( pvarg : *mut super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantCopy ( pvargdest : *mut super::Com:: VARIANT , pvargsrc : *const super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantCopyInd ( pvardest : *mut super::Com:: VARIANT , pvargsrc : *const super::Com:: VARIANT ) -> ::windows_sys::core::HRESULT );
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] fn VariantInit ( pvarg : *mut super::Com:: VARIANT ) -> ( ) );
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`*"] fn VariantTimeToDosDateTime ( vtime : f64 , pwdosdate : *mut u16 , pwdostime : *mut u16 ) -> i32 );
#[cfg(feature = "Win32_Foundation")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"] fn VariantTimeToSystemTime ( vtime : f64 , lpsystemtime : *mut super::super::Foundation:: SYSTEMTIME ) -> i32 );
#[cfg(feature = "Win32_System_Com")]
::windows_targets::link ! ( "oleaut32.dll""system" #[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"] fn VectorFromBstr ( bstr : ::windows_sys::core::BSTR , ppsa : *mut *mut super::Com:: SAFEARRAY ) -> ::windows_sys::core::HRESULT );
pub type IAdviseSinkEx = *mut ::core::ffi::c_void;
pub type ICanHandleException = *mut ::core::ffi::c_void;
pub type IClassFactory2 = *mut ::core::ffi::c_void;
pub type IContinue = *mut ::core::ffi::c_void;
pub type IContinueCallback = *mut ::core::ffi::c_void;
pub type ICreateErrorInfo = *mut ::core::ffi::c_void;
pub type ICreateTypeInfo = *mut ::core::ffi::c_void;
pub type ICreateTypeInfo2 = *mut ::core::ffi::c_void;
pub type ICreateTypeLib = *mut ::core::ffi::c_void;
pub type ICreateTypeLib2 = *mut ::core::ffi::c_void;
pub type IDispError = *mut ::core::ffi::c_void;
pub type IDispatchEx = *mut ::core::ffi::c_void;
pub type IDropSource = *mut ::core::ffi::c_void;
pub type IDropSourceNotify = *mut ::core::ffi::c_void;
pub type IDropTarget = *mut ::core::ffi::c_void;
pub type IEnterpriseDropTarget = *mut ::core::ffi::c_void;
pub type IEnumOLEVERB = *mut ::core::ffi::c_void;
pub type IEnumOleDocumentViews = *mut ::core::ffi::c_void;
pub type IEnumOleUndoUnits = *mut ::core::ffi::c_void;
pub type IEnumVARIANT = *mut ::core::ffi::c_void;
pub type IFont = *mut ::core::ffi::c_void;
pub type IFontDisp = *mut ::core::ffi::c_void;
pub type IFontEventsDisp = *mut ::core::ffi::c_void;
pub type IGetOleObject = *mut ::core::ffi::c_void;
pub type IGetVBAObject = *mut ::core::ffi::c_void;
pub type IObjectIdentity = *mut ::core::ffi::c_void;
pub type IObjectWithSite = *mut ::core::ffi::c_void;
pub type IOleAdviseHolder = *mut ::core::ffi::c_void;
pub type IOleCache = *mut ::core::ffi::c_void;
pub type IOleCache2 = *mut ::core::ffi::c_void;
pub type IOleCacheControl = *mut ::core::ffi::c_void;
pub type IOleClientSite = *mut ::core::ffi::c_void;
pub type IOleCommandTarget = *mut ::core::ffi::c_void;
pub type IOleContainer = *mut ::core::ffi::c_void;
pub type IOleControl = *mut ::core::ffi::c_void;
pub type IOleControlSite = *mut ::core::ffi::c_void;
pub type IOleDocument = *mut ::core::ffi::c_void;
pub type IOleDocumentSite = *mut ::core::ffi::c_void;
pub type IOleDocumentView = *mut ::core::ffi::c_void;
pub type IOleInPlaceActiveObject = *mut ::core::ffi::c_void;
pub type IOleInPlaceFrame = *mut ::core::ffi::c_void;
pub type IOleInPlaceObject = *mut ::core::ffi::c_void;
pub type IOleInPlaceObjectWindowless = *mut ::core::ffi::c_void;
pub type IOleInPlaceSite = *mut ::core::ffi::c_void;
pub type IOleInPlaceSiteEx = *mut ::core::ffi::c_void;
pub type IOleInPlaceSiteWindowless = *mut ::core::ffi::c_void;
pub type IOleInPlaceUIWindow = *mut ::core::ffi::c_void;
pub type IOleItemContainer = *mut ::core::ffi::c_void;
pub type IOleLink = *mut ::core::ffi::c_void;
pub type IOleObject = *mut ::core::ffi::c_void;
pub type IOleParentUndoUnit = *mut ::core::ffi::c_void;
pub type IOleUILinkContainerA = *mut ::core::ffi::c_void;
pub type IOleUILinkContainerW = *mut ::core::ffi::c_void;
pub type IOleUILinkInfoA = *mut ::core::ffi::c_void;
pub type IOleUILinkInfoW = *mut ::core::ffi::c_void;
pub type IOleUIObjInfoA = *mut ::core::ffi::c_void;
pub type IOleUIObjInfoW = *mut ::core::ffi::c_void;
pub type IOleUndoManager = *mut ::core::ffi::c_void;
pub type IOleUndoUnit = *mut ::core::ffi::c_void;
pub type IOleWindow = *mut ::core::ffi::c_void;
pub type IParseDisplayName = *mut ::core::ffi::c_void;
pub type IPerPropertyBrowsing = *mut ::core::ffi::c_void;
pub type IPersistPropertyBag = *mut ::core::ffi::c_void;
pub type IPersistPropertyBag2 = *mut ::core::ffi::c_void;
pub type IPicture = *mut ::core::ffi::c_void;
pub type IPicture2 = *mut ::core::ffi::c_void;
pub type IPictureDisp = *mut ::core::ffi::c_void;
pub type IPointerInactive = *mut ::core::ffi::c_void;
pub type IPrint = *mut ::core::ffi::c_void;
pub type IPropertyNotifySink = *mut ::core::ffi::c_void;
pub type IPropertyPage = *mut ::core::ffi::c_void;
pub type IPropertyPage2 = *mut ::core::ffi::c_void;
pub type IPropertyPageSite = *mut ::core::ffi::c_void;
pub type IProtectFocus = *mut ::core::ffi::c_void;
pub type IProtectedModeMenuServices = *mut ::core::ffi::c_void;
pub type IProvideClassInfo = *mut ::core::ffi::c_void;
pub type IProvideClassInfo2 = *mut ::core::ffi::c_void;
pub type IProvideMultipleClassInfo = *mut ::core::ffi::c_void;
pub type IProvideRuntimeContext = *mut ::core::ffi::c_void;
pub type IQuickActivate = *mut ::core::ffi::c_void;
pub type IRecordInfo = *mut ::core::ffi::c_void;
pub type ISimpleFrameSite = *mut ::core::ffi::c_void;
pub type ISpecifyPropertyPages = *mut ::core::ffi::c_void;
pub type ITypeChangeEvents = *mut ::core::ffi::c_void;
pub type ITypeFactory = *mut ::core::ffi::c_void;
pub type ITypeMarshal = *mut ::core::ffi::c_void;
pub type IVBFormat = *mut ::core::ffi::c_void;
pub type IVBGetControl = *mut ::core::ffi::c_void;
pub type IVariantChangeType = *mut ::core::ffi::c_void;
pub type IViewObject = *mut ::core::ffi::c_void;
pub type IViewObject2 = *mut ::core::ffi::c_void;
pub type IViewObjectEx = *mut ::core::ffi::c_void;
pub type IZoomEvents = *mut ::core::ffi::c_void;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_CColorPropPage: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x0be35201_8f91_11ce_9de3_00aa004bb851);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_CFontPropPage: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x0be35200_8f91_11ce_9de3_00aa004bb851);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_CPicturePropPage: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x0be35202_8f91_11ce_9de3_00aa004bb851);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_ConvertVBX: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0xfb8f0822_0164_101b_84ed_08002b2ec713);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_PersistPropset: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0xfb8f0821_0164_101b_84ed_08002b2ec713);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_StdFont: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x0be35203_8f91_11ce_9de3_00aa004bb851);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CLSID_StdPicture: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x0be35204_8f91_11ce_9de3_00aa004bb851);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_ADVISELIMIT: ::windows_sys::core::HRESULT = -2147220991i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_CANNOTCONNECT: ::windows_sys::core::HRESULT = -2147220990i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_FIRST: i32 = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_LAST: ::windows_sys::core::HRESULT = -2147220977i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_NOCONNECTION: ::windows_sys::core::HRESULT = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_E_OVERRIDDEN: ::windows_sys::core::HRESULT = -2147220989i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_S_FIRST: ::windows_sys::core::HRESULT = 262656i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CONNECT_S_LAST: ::windows_sys::core::HRESULT = 262671i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CTL_E_ILLEGALFUNCTIONCALL: i32 = -2146828283i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DD_DEFDRAGDELAY: u32 = 200u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DD_DEFDRAGMINDIST: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DD_DEFSCROLLDELAY: u32 = 50u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DD_DEFSCROLLINSET: u32 = 11u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DD_DEFSCROLLINTERVAL: u32 = 50u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPATCH_CONSTRUCT: u32 = 16384u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ABOUTBOX: i32 = -552i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ACCELERATOR: i32 = -543i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ADDITEM: i32 = -553i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_APPEARANCE: i32 = -716i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_AUTOCLIP: i32 = -715i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_BACKCOLOR: i32 = -701i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_CHARSET: i32 = -727i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_CODEPAGE: i32 = -725i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_DISPLAYASDEFAULT: i32 = -713i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_DISPLAYNAME: i32 = -702i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_FONT: i32 = -703i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_FORECOLOR: i32 = -704i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_LOCALEID: i32 = -705i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_MESSAGEREFLECT: i32 = -706i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_PALETTE: i32 = -726i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_RIGHTTOLEFT: i32 = -732i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_SCALEUNITS: i32 = -707i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_SHOWGRABHANDLES: i32 = -711i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_SHOWHATCHING: i32 = -712i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_SUPPORTSMNEMONICS: i32 = -714i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_TEXTALIGN: i32 = -708i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_TOPTOBOTTOM: i32 = -733i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_TRANSFERPRIORITY: i32 = -728i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_UIDEAD: i32 = -710i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AMBIENT_USERMODE: i32 = -709i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_APPEARANCE: i32 = -520i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_AUTOSIZE: i32 = -500i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BACKCOLOR: i32 = -501i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BACKSTYLE: i32 = -502i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BORDERCOLOR: i32 = -503i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BORDERSTYLE: i32 = -504i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BORDERVISIBLE: i32 = -519i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_BORDERWIDTH: i32 = -505i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_CAPTION: i32 = -518i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_CLEAR: i32 = -554i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_CLICK: i32 = -600i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_CLICK_VALUE: i32 = -610i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_COLLECT: i32 = -8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_COLUMN: i32 = -529i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_CONSTRUCTOR: i32 = -6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DBLCLICK: i32 = -601i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DESTRUCTOR: i32 = -7i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DISPLAYSTYLE: i32 = -540i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DOCLICK: i32 = -551i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DRAWMODE: i32 = -507i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DRAWSTYLE: i32 = -508i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_DRAWWIDTH: i32 = -509i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_Delete: i32 = -801i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ENABLED: i32 = -514i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ENTERKEYBEHAVIOR: i32 = -544i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_ERROREVENT: i32 = -608i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_EVALUATE: i32 = -5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FILLCOLOR: i32 = -510i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FILLSTYLE: i32 = -511i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT: i32 = -512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_BOLD: u32 = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_CHANGED: u32 = 9u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_CHARSET: u32 = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_ITALIC: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_NAME: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_SIZE: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_STRIKE: u32 = 6u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_UNDER: u32 = 5u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FONT_WEIGHT: u32 = 7u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_FORECOLOR: i32 = -513i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_GROUPNAME: i32 = -541i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_HWND: i32 = -515i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_IMEMODE: i32 = -542i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_KEYDOWN: i32 = -602i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_KEYPRESS: i32 = -603i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_KEYUP: i32 = -604i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_LIST: i32 = -528i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_LISTCOUNT: i32 = -531i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_LISTINDEX: i32 = -526i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MAXLENGTH: i32 = -533i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MOUSEDOWN: i32 = -605i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MOUSEICON: i32 = -522i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MOUSEMOVE: i32 = -606i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MOUSEPOINTER: i32 = -521i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MOUSEUP: i32 = -607i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MULTILINE: i32 = -537i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_MULTISELECT: i32 = -532i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_NEWENUM: i32 = -4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_NUMBEROFCOLUMNS: i32 = -539i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_NUMBEROFROWS: i32 = -538i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_Name: i32 = -800i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_Object: i32 = -802i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PASSWORDCHAR: i32 = -534i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICTURE: i32 = -523i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_HANDLE: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_HEIGHT: u32 = 5u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_HPAL: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_RENDER: u32 = 6u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_TYPE: u32 = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PICT_WIDTH: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_PROPERTYPUT: i32 = -3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_Parent: i32 = -803i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_READYSTATE: i32 = -525i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_READYSTATECHANGE: i32 = -609i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_REFRESH: i32 = -550i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_REMOVEITEM: i32 = -555i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_RIGHTTOLEFT: i32 = -611i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_SCROLLBARS: i32 = -535i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_SELECTED: i32 = -527i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_SELLENGTH: i32 = -548i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_SELSTART: i32 = -547i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_SELTEXT: i32 = -546i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_STARTENUM: i32 = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_TABKEYBEHAVIOR: i32 = -545i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_TABSTOP: i32 = -516i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_TEXT: i32 = -517i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_THIS: i32 = -613i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_TOPTOBOTTOM: i32 = -612i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_UNKNOWN: i32 = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_VALID: i32 = -524i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_VALUE: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISPID_WORDWRAP: i32 = -536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_SIBLING: i32 = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_CHECKVALUEEXCLUSIVE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430c_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_COLOR: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504301_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTBOLD: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430f_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTITALIC: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504310_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTNAME: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430d_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTSIZE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430e_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTSTRIKETHROUGH: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504312_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_FONTUNDERSCORE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504311_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_HANDLE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504313_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_HIMETRIC: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504300_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_OPTIONVALUEEXCLUSIVE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430b_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_TRISTATE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x6650430a_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_XPOS: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504306_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_XPOSPIXEL: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504302_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_XSIZE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504308_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_XSIZEPIXEL: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504304_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_YPOS: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504307_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_YPOSPIXEL: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504303_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_YSIZE: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504309_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUID_YSIZEPIXEL: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x66504305_be0f_101a_8bbb_00aa00300cab);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_BZ_ICON: u32 = 601u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_BZ_MESSAGE1: u32 = 602u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_BZ_RETRY: u32 = 600u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_BZ_SWITCHTO: u32 = 604u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_BROWSE: u32 = 130u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_CURRENT: u32 = 121u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_CURRENTICON: u32 = 122u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_DEFAULT: u32 = 123u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_DEFAULTICON: u32 = 124u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_FROMFILE: u32 = 125u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_FROMFILEEDIT: u32 = 126u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_GROUP: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_ICONDISPLAY: u32 = 131u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_ICONLIST: u32 = 127u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_LABEL: u32 = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CI_LABELEDIT: u32 = 129u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_ACTIVATEAS: u32 = 156u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_ACTIVATELIST: u32 = 154u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_CHANGEICON: u32 = 153u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_CONVERTLIST: u32 = 158u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_CONVERTTO: u32 = 155u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_DISPLAYASICON: u32 = 152u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_ICONDISPLAY: u32 = 165u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_OBJECTTYPE: u32 = 150u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_CV_RESULTTEXT: u32 = 157u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_AUTOMATIC: u32 = 202u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_CANCELLINK: u32 = 209u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_CHANGESOURCE: u32 = 201u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_COL1: u32 = 220u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_COL2: u32 = 221u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_COL3: u32 = 222u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_LINKSLISTBOX: u32 = 206u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_LINKSOURCE: u32 = 216u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_LINKTYPE: u32 = 217u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_MANUAL: u32 = 212u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_OPENSOURCE: u32 = 211u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_EL_UPDATENOW: u32 = 210u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_CONVERT: u32 = 1013u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_OBJECTICON: u32 = 1014u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_OBJECTLOCATION: u32 = 1022u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_OBJECTNAME: u32 = 1009u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_OBJECTSIZE: u32 = 1011u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_GP_OBJECTTYPE: u32 = 1010u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_ADDCONTROL: u32 = 2115u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_CHANGEICON: u32 = 2105u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_CONTROLTYPELIST: u32 = 2116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_CREATEFROMFILE: u32 = 2101u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_CREATENEW: u32 = 2100u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_DISPLAYASICON: u32 = 2104u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_FILE: u32 = 2106u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_FILEDISPLAY: u32 = 2107u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_FILETEXT: u32 = 2112u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_FILETYPE: u32 = 2113u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_ICONDISPLAY: u32 = 2110u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_INSERTCONTROL: u32 = 2114u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_LINKFILE: u32 = 2102u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_OBJECTTYPELIST: u32 = 2103u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_OBJECTTYPETEXT: u32 = 2111u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_RESULTIMAGE: u32 = 2108u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_IO_RESULTTEXT: u32 = 2109u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_AUTOMATIC: u32 = 1016u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_BREAKLINK: u32 = 1008u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_CHANGESOURCE: u32 = 1015u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_DATE: u32 = 1018u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_LINKSOURCE: u32 = 1012u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_MANUAL: u32 = 1017u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_OPENSOURCE: u32 = 1006u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_TIME: u32 = 1019u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_LP_UPDATENOW: u32 = 1007u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_OLEUIHELP: u32 = 99u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_CHANGEICON: u32 = 508u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_DISPLAYASICON: u32 = 506u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_DISPLAYLIST: u32 = 505u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_ICONDISPLAY: u32 = 507u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_PASTE: u32 = 500u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_PASTELINK: u32 = 501u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_PASTELINKLIST: u32 = 504u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_PASTELIST: u32 = 503u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_RESULTIMAGE: u32 = 509u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_RESULTTEXT: u32 = 510u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PS_SOURCETEXT: u32 = 502u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PU_CONVERT: u32 = 902u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PU_ICON: u32 = 908u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PU_LINKS: u32 = 900u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_PU_TEXT: u32 = 901u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_UL_METER: u32 = 1029u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_UL_PERCENT: u32 = 1031u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_UL_PROGRESS: u32 = 1032u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_UL_STOP: u32 = 1030u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_ASICON: u32 = 1003u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_CHANGEICON: u32 = 1001u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_EDITABLE: u32 = 1002u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_ICONDISPLAY: u32 = 1021u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_PERCENT: u32 = 1000u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_RELATIVE: u32 = 1005u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_RESULTIMAGE: u32 = 1033u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_SCALETXT: u32 = 1034u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDC_VP_SPIN: u32 = 1006u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_BUSY: u32 = 1006u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CANNOTUPDATELINK: u32 = 1008u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CHANGEICON: u32 = 1001u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CHANGEICONBROWSE: u32 = 1011u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CHANGESOURCE: u32 = 1009u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CHANGESOURCE4: u32 = 1013u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CONVERT: u32 = 1002u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CONVERT4: u32 = 1103u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CONVERTONLY: u32 = 1012u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_CONVERTONLY4: u32 = 1104u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_EDITLINKS: u32 = 1004u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_EDITLINKS4: u32 = 1105u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_GNRLPROPS: u32 = 1100u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_GNRLPROPS4: u32 = 1106u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_INSERTFILEBROWSE: u32 = 1010u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_INSERTOBJECT: u32 = 1000u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKPROPS: u32 = 1102u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKPROPS4: u32 = 1107u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKSOURCEUNAVAILABLE: u32 = 1020u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKTYPECHANGED: u32 = 1022u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKTYPECHANGEDA: u32 = 1026u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_LINKTYPECHANGEDW: u32 = 1022u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_OUTOFMEMORY: u32 = 1024u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_PASTESPECIAL: u32 = 1003u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_PASTESPECIAL4: u32 = 1108u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_SERVERNOTFOUND: u32 = 1023u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_SERVERNOTREG: u32 = 1021u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_SERVERNOTREGA: u32 = 1025u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_SERVERNOTREGW: u32 = 1021u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_UPDATELINKS: u32 = 1007u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IDD_VIEWPROPS: u32 = 1101u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ID_BROWSE_ADDCONTROL: u32 = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ID_BROWSE_CHANGEICON: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ID_BROWSE_CHANGESOURCE: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ID_BROWSE_INSERTFILE: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ID_DEFAULTINST: i32 = -2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const INSTALL_SCOPE_INVALID: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const INSTALL_SCOPE_MACHINE: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const INSTALL_SCOPE_USER: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LOAD_TLB_AS_32BIT: u32 = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LOAD_TLB_AS_64BIT: u32 = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LOCALE_USE_NLS: u32 = 268435456u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MEMBERID_NIL: i32 = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MK_ALT: u32 = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_CANCELED: i32 = -2147221245i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_DISABLED: i32 = -2147221247i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_FIRST: i32 = -2147221248i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_NOHELP: i32 = -2147221246i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_NOTSUPPORTED: i32 = -2147221248i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MSOCMDERR_E_UNKNOWNGROUP: i32 = -2147221244i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OCM__BASE: u32 = 8192u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OF_GET: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OF_HANDLER: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OF_SET: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_ACTIVEXINSTALL_CLSID: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_ACTIVEXINSTALL_DISPLAYNAME: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_ACTIVEXINSTALL_INSTALLSCOPE: u32 = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_ACTIVEXINSTALL_PUBLISHER: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_ACTIVEXINSTALL_SOURCEURL: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_SHOWPAGEACTIONMENU_HWND: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_SHOWPAGEACTIONMENU_X: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDARGINDEX_SHOWPAGEACTIONMENU_Y: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_CANCELED: ::windows_sys::core::HRESULT = -2147221245i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_DISABLED: ::windows_sys::core::HRESULT = -2147221247i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_FIRST: ::windows_sys::core::HRESULT = -2147221248i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_NOHELP: ::windows_sys::core::HRESULT = -2147221246i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_NOTSUPPORTED: i32 = -2147221248i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDERR_E_UNKNOWNGROUP: ::windows_sys::core::HRESULT = -2147221244i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMD_TASKDLGID_ONBEFOREUNLOAD: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_PROPERTIES: i32 = -7i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLESTDDELIM: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("\\");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_BZERR_HTASKINVALID: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_BZ_CALLUNBLOCKED: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_BZ_RETRYSELECTED: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_BZ_SWITCHTOSELECTED: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CANCEL: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CIERR_MUSTHAVECLSID: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CIERR_MUSTHAVECURRENTMETAFILE: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CIERR_SZICONEXEINVALID: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_FROMNOTNULL: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_LINKCNTRINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_LINKCNTRNULL: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_SOURCEINVALID: u32 = 121u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_SOURCENULL: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_SOURCEPARSEERROR: u32 = 122u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_SOURCEPARSERROR: u32 = 122u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CSERR_TONOTNULL: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CTERR_CBFORMATINVALID: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CTERR_CLASSIDINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CTERR_DVASPECTINVALID: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CTERR_HMETAPICTINVALID: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_CTERR_STRINGINVALID: u32 = 121u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ELERR_LINKCNTRINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ELERR_LINKCNTRNULL: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_CBSTRUCTINCORRECT: u32 = 103u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_DIALOGFAILURE: u32 = 112u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_FINDTEMPLATEFAILURE: u32 = 110u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_GLOBALMEMALLOC: u32 = 114u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_HINSTANCEINVALID: u32 = 107u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_HRESOURCEINVALID: u32 = 109u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_HWNDOWNERINVALID: u32 = 104u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LOADSTRING: u32 = 115u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LOADTEMPLATEFAILURE: u32 = 111u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LOCALMEMALLOC: u32 = 113u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LPFNHOOKINVALID: u32 = 106u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LPSZCAPTIONINVALID: u32 = 105u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_LPSZTEMPLATEINVALID: u32 = 108u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_OLEMEMALLOC: u32 = 100u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_STANDARDMAX: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_STANDARDMIN: u32 = 100u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_STRUCTUREINVALID: u32 = 102u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_ERR_STRUCTURENULL: u32 = 101u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_FALSE: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_GPERR_CBFORMATINVALID: u32 = 130u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_GPERR_CLASSIDINVALID: u32 = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_GPERR_LPCLSIDEXCLUDEINVALID: u32 = 129u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_GPERR_STRINGINVALID: u32 = 127u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_ARRLINKTYPESINVALID: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_ARRPASTEENTRIESINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_CCHFILEINVALID: u32 = 125u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_HICONINVALID: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPCLSIDEXCLUDEINVALID: u32 = 124u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPFORMATETCINVALID: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPIOLECLIENTSITEINVALID: u32 = 121u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPISTORAGEINVALID: u32 = 122u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPSZFILEINVALID: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_LPSZLABELINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_PPVOBJINVALID: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_SCODEHASERROR: u32 = 123u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_IOERR_SRCDATAOBJECTINVALID: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_LPERR_LINKCNTRINVALID: u32 = 134u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_LPERR_LINKCNTRNULL: u32 = 133u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OK: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_DLGPROCNOTNULL: u32 = 125u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_INVALIDPAGES: u32 = 123u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_LINKINFOINVALID: u32 = 137u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_LPARAMNOTZERO: u32 = 126u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_NOTSUPPORTED: u32 = 124u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_OBJINFOINVALID: u32 = 136u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_PAGESINCORRECT: u32 = 122u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_PROPERTYSHEET: u32 = 135u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_PROPSHEETINVALID: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_PROPSHEETNULL: u32 = 118u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_PROPSINVALID: u32 = 121u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_SUBPROPINVALID: u32 = 117u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_SUBPROPNULL: u32 = 116u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_OPERR_SUPPROP: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_PSERR_CLIPBOARDCHANGED: u32 = 119u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_PSERR_GETCLIPBOARDFAILED: u32 = 120u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_QUERY_GETCLASSID: u32 = 65280u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_QUERY_LINKBROKEN: u32 = 65281u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_SUCCESS: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_VPERR_DVASPECTINVALID: u32 = 132u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUI_VPERR_METAPICTINVALID: u32 = 131u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEVERB_PRIMARY: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OT_EMBEDDED: i32 = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OT_LINK: i32 = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OT_STATIC: i32 = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PERPROP_E_FIRST: i32 = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PERPROP_E_LAST: ::windows_sys::core::HRESULT = -2147220977i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PERPROP_E_NOPAGEAVAILABLE: ::windows_sys::core::HRESULT = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PERPROP_S_FIRST: ::windows_sys::core::HRESULT = 262656i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PERPROP_S_LAST: ::windows_sys::core::HRESULT = 262671i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROP_HWND_CHGICONDLG: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("HWND_CIDLG");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PS_MAXLINKTYPES: u32 = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_E_CLASS: ::windows_sys::core::HRESULT = -2147220991i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_E_FIRST: i32 = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_E_LAST: ::windows_sys::core::HRESULT = -2147220977i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_E_TYPELIB: ::windows_sys::core::HRESULT = -2147220992i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_S_FIRST: ::windows_sys::core::HRESULT = 262656i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SELFREG_S_LAST: ::windows_sys::core::HRESULT = 262671i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SID_GetCaller: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x4717cc40_bcb9_11d0_9336_00a0c90dcaa9);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SID_ProvideRuntimeContext: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x74a5040c_dd0c_48f0_ac85_194c3259180a);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SID_VariantConversion: ::windows_sys::core::GUID = ::windows_sys::core::GUID::from_u128(0x1f101481_bccd_11d0_9336_00a0c90dcaa9);
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE2_LCID: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE2_MAJORVERNUM: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE2_MINORVERNUM: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE_LCID: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE_MAJORVERNUM: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE_MINORVERNUM: u32 = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDOLE_TLB: ::windows_sys::core::PCSTR = ::windows_sys::core::s!("stdole2.tlb");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const STDTYPE_TLB: ::windows_sys::core::PCSTR = ::windows_sys::core::s!("stdole2.tlb");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_ADDCONTROL: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_ADDCONTROL");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_BROWSE: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_BROWSE");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_BROWSE_OFN: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_BROWSE_OFN");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_CHANGEICON: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_CHANGEICON");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_CHANGESOURCE: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_CHANGESOURCE");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_CLOSEBUSYDIALOG: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_CLOSEBUSYDIALOG");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_CONVERT: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_CONVERT");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_ENDDIALOG: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_ENDDIALOG");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SZOLEUI_MSG_HELP: ::windows_sys::core::PCWSTR = ::windows_sys::core::w!("OLEUI_MSG_HELP");
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TIFLAGS_EXTENDDISPATCHONLY: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_ALPHABOOL: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_CALENDAR_GREGORIAN: u32 = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_CALENDAR_HIJRI: u32 = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_CALENDAR_THAI: u32 = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_LOCALBOOL: u32 = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_NOUSEROVERRIDE: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_NOVALUEPROP: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARIANT_USE_NLS: u32 = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_CALENDAR_GREGORIAN: u32 = 256u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_CALENDAR_HIJRI: u32 = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_CALENDAR_THAI: u32 = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_DATEVALUEONLY: u32 = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_FORMAT_NOSUBSTITUTE: u32 = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_FOURDIGITYEARS: u32 = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_LOCALBOOL: u32 = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_TIMEVALUEONLY: u32 = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VAR_VALIDDATE: u32 = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VTDATEGRE_MAX: u32 = 2958465u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VTDATEGRE_MIN: i32 = -657434i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VT_BLOB_PROPSET: u32 = 75u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VT_STORED_PROPSET: u32 = 74u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VT_STREAMED_PROPSET: u32 = 73u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VT_VERBOSE_ENUM: u32 = 76u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const WIN32: u32 = 100u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexEnumAll: i32 = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexEnumDefault: i32 = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameCaseInsensitive: i32 = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameCaseSensitive: i32 = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameEnsure: i32 = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameImplicit: i32 = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameInternal: i32 = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexNameNoDynamicProperties: i32 = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type ACTIVATEFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ACTIVATE_WINDOWLESS: ACTIVATEFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type ACTIVEOBJECT_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ACTIVEOBJECT_STRONG: ACTIVEOBJECT_FLAGS = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ACTIVEOBJECT_WEAK: ACTIVEOBJECT_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type BINDSPEED = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BINDSPEED_INDEFINITE: BINDSPEED = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BINDSPEED_MODERATE: BINDSPEED = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BINDSPEED_IMMEDIATE: BINDSPEED = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type BUSY_DIALOG_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BZ_DISABLECANCELBUTTON: BUSY_DIALOG_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BZ_DISABLESWITCHTOBUTTON: BUSY_DIALOG_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BZ_DISABLERETRYBUTTON: BUSY_DIALOG_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const BZ_NOTRESPONDINGDIALOG: BUSY_DIALOG_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type CHANGEKIND = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_ADDMEMBER: CHANGEKIND = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_DELETEMEMBER: CHANGEKIND = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_SETNAMES: CHANGEKIND = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_SETDOCUMENTATION: CHANGEKIND = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_GENERAL: CHANGEKIND = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_INVALIDATE: CHANGEKIND = 5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_CHANGEFAILED: CHANGEKIND = 6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CHANGEKIND_MAX: CHANGEKIND = 7i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type CHANGE_ICON_FLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CIF_SHOWHELP: CHANGE_ICON_FLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CIF_SELECTCURRENT: CHANGE_ICON_FLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CIF_SELECTDEFAULT: CHANGE_ICON_FLAGS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CIF_SELECTFROMFILE: CHANGE_ICON_FLAGS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CIF_USEICONEXE: CHANGE_ICON_FLAGS = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type CHANGE_SOURCE_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CSF_SHOWHELP: CHANGE_SOURCE_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CSF_VALIDSOURCE: CHANGE_SOURCE_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CSF_ONLYGETSOURCE: CHANGE_SOURCE_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CSF_EXPLORER: CHANGE_SOURCE_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type CLIPBOARD_FORMAT = u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_TEXT: CLIPBOARD_FORMAT = 1u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_BITMAP: CLIPBOARD_FORMAT = 2u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_METAFILEPICT: CLIPBOARD_FORMAT = 3u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SYLK: CLIPBOARD_FORMAT = 4u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DIF: CLIPBOARD_FORMAT = 5u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_TIFF: CLIPBOARD_FORMAT = 6u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_OEMTEXT: CLIPBOARD_FORMAT = 7u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DIB: CLIPBOARD_FORMAT = 8u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_PALETTE: CLIPBOARD_FORMAT = 9u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_PENDATA: CLIPBOARD_FORMAT = 10u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_RIFF: CLIPBOARD_FORMAT = 11u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_WAVE: CLIPBOARD_FORMAT = 12u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_UNICODETEXT: CLIPBOARD_FORMAT = 13u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_ENHMETAFILE: CLIPBOARD_FORMAT = 14u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_HDROP: CLIPBOARD_FORMAT = 15u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_LOCALE: CLIPBOARD_FORMAT = 16u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DIBV5: CLIPBOARD_FORMAT = 17u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_MAX: CLIPBOARD_FORMAT = 18u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_OWNERDISPLAY: CLIPBOARD_FORMAT = 128u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DSPTEXT: CLIPBOARD_FORMAT = 129u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DSPBITMAP: CLIPBOARD_FORMAT = 130u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DSPMETAFILEPICT: CLIPBOARD_FORMAT = 131u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DSPENHMETAFILE: CLIPBOARD_FORMAT = 142u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_PRIVATEFIRST: CLIPBOARD_FORMAT = 512u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_PRIVATELAST: CLIPBOARD_FORMAT = 767u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_GDIOBJFIRST: CLIPBOARD_FORMAT = 768u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_GDIOBJLAST: CLIPBOARD_FORMAT = 1023u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type CTRLINFO = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CTRLINFO_EATS_RETURN: CTRLINFO = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CTRLINFO_EATS_ESCAPE: CTRLINFO = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type DISCARDCACHE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISCARDCACHE_SAVEIFDIRTY: DISCARDCACHE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DISCARDCACHE_NOSAVE: DISCARDCACHE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type DOCMISC = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DOCMISC_CANCREATEMULTIPLEVIEWS: DOCMISC = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DOCMISC_SUPPORTCOMPLEXRECTANGLES: DOCMISC = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DOCMISC_CANTOPENEDIT: DOCMISC = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DOCMISC_NOFILESUPPORT: DOCMISC = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type DROPEFFECT = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DROPEFFECT_NONE: DROPEFFECT = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DROPEFFECT_COPY: DROPEFFECT = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DROPEFFECT_MOVE: DROPEFFECT = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DROPEFFECT_LINK: DROPEFFECT = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DROPEFFECT_SCROLL: DROPEFFECT = 2147483648u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type DVASPECTINFOFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DVASPECTINFOFLAG_CANOPTIMIZE: DVASPECTINFOFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type DVEXTENTMODE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DVEXTENT_CONTENT: DVEXTENTMODE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const DVEXTENT_INTEGRAL: DVEXTENTMODE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type EDIT_LINKS_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ELF_SHOWHELP: EDIT_LINKS_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ELF_DISABLEUPDATENOW: EDIT_LINKS_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ELF_DISABLEOPENSOURCE: EDIT_LINKS_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ELF_DISABLECHANGESOURCE: EDIT_LINKS_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const ELF_DISABLECANCELLINK: EDIT_LINKS_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type EMBDHLP_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const EMBDHLP_INPROC_HANDLER: EMBDHLP_FLAGS = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const EMBDHLP_INPROC_SERVER: EMBDHLP_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const EMBDHLP_CREATENOW: EMBDHLP_FLAGS = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const EMBDHLP_DELAYCREATE: EMBDHLP_FLAGS = 65536u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type ENUM_CONTROLS_WHICH_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GCW_WCH_SIBLING: ENUM_CONTROLS_WHICH_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_CONTAINER: ENUM_CONTROLS_WHICH_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_CONTAINED: ENUM_CONTROLS_WHICH_FLAGS = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_ALL: ENUM_CONTROLS_WHICH_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_FREVERSEDIR: ENUM_CONTROLS_WHICH_FLAGS = 134217728u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_FONLYAFTER: ENUM_CONTROLS_WHICH_FLAGS = 268435456u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_FONLYBEFORE: ENUM_CONTROLS_WHICH_FLAGS = 536870912u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GC_WCH_FSELECTED: ENUM_CONTROLS_WHICH_FLAGS = 1073741824u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type FDEX_PROP_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanGet: FDEX_PROP_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotGet: FDEX_PROP_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanPut: FDEX_PROP_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotPut: FDEX_PROP_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanPutRef: FDEX_PROP_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotPutRef: FDEX_PROP_FLAGS = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropNoSideEffects: FDEX_PROP_FLAGS = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropDynamicType: FDEX_PROP_FLAGS = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanCall: FDEX_PROP_FLAGS = 256u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotCall: FDEX_PROP_FLAGS = 512u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanConstruct: FDEX_PROP_FLAGS = 1024u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotConstruct: FDEX_PROP_FLAGS = 2048u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCanSourceEvents: FDEX_PROP_FLAGS = 4096u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const fdexPropCannotSourceEvents: FDEX_PROP_FLAGS = 8192u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type GUIDKIND = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const GUIDKIND_DEFAULT_SOURCE_DISP_IID: GUIDKIND = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type HITRESULT = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const HITRESULT_OUTSIDE: HITRESULT = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const HITRESULT_TRANSPARENT: HITRESULT = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const HITRESULT_CLOSE: HITRESULT = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const HITRESULT_HIT: HITRESULT = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type IGNOREMIME = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IGNOREMIME_PROMPT: IGNOREMIME = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IGNOREMIME_TEXT: IGNOREMIME = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type INSERT_OBJECT_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_SHOWHELP: INSERT_OBJECT_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_SELECTCREATENEW: INSERT_OBJECT_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_SELECTCREATEFROMFILE: INSERT_OBJECT_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_CHECKLINK: INSERT_OBJECT_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_CHECKDISPLAYASICON: INSERT_OBJECT_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_CREATENEWOBJECT: INSERT_OBJECT_FLAGS = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_CREATEFILEOBJECT: INSERT_OBJECT_FLAGS = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_CREATELINKOBJECT: INSERT_OBJECT_FLAGS = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_DISABLELINK: INSERT_OBJECT_FLAGS = 256u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_VERIFYSERVERSEXIST: INSERT_OBJECT_FLAGS = 512u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_DISABLEDISPLAYASICON: INSERT_OBJECT_FLAGS = 1024u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_HIDECHANGEICON: INSERT_OBJECT_FLAGS = 2048u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_SHOWINSERTCONTROL: INSERT_OBJECT_FLAGS = 4096u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const IOF_SELECTCREATECONTROL: INSERT_OBJECT_FLAGS = 8192u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type KEYMODIFIERS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const KEYMOD_SHIFT: KEYMODIFIERS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const KEYMOD_CONTROL: KEYMODIFIERS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const KEYMOD_ALT: KEYMODIFIERS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type LIBFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LIBFLAG_FRESTRICTED: LIBFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LIBFLAG_FCONTROL: LIBFLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LIBFLAG_FHIDDEN: LIBFLAGS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LIBFLAG_FHASDISKIMAGE: LIBFLAGS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type LOAD_PICTURE_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LP_DEFAULT: LOAD_PICTURE_FLAGS = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LP_MONOCHROME: LOAD_PICTURE_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LP_VGACOLOR: LOAD_PICTURE_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const LP_COLOR: LOAD_PICTURE_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type MEDIAPLAYBACK_STATE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MEDIAPLAYBACK_RESUME: MEDIAPLAYBACK_STATE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MEDIAPLAYBACK_PAUSE: MEDIAPLAYBACK_STATE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MEDIAPLAYBACK_PAUSE_AND_SUSPEND: MEDIAPLAYBACK_STATE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MEDIAPLAYBACK_RESUME_FROM_SUSPEND: MEDIAPLAYBACK_STATE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type MULTICLASSINFO_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MULTICLASSINFO_GETTYPEINFO: MULTICLASSINFO_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MULTICLASSINFO_GETNUMRESERVEDDISPIDS: MULTICLASSINFO_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MULTICLASSINFO_GETIIDPRIMARY: MULTICLASSINFO_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const MULTICLASSINFO_GETIIDSOURCE: MULTICLASSINFO_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type NUMPARSE_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_LEADING_WHITE: NUMPARSE_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_TRAILING_WHITE: NUMPARSE_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_LEADING_PLUS: NUMPARSE_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_TRAILING_PLUS: NUMPARSE_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_LEADING_MINUS: NUMPARSE_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_TRAILING_MINUS: NUMPARSE_FLAGS = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_HEX_OCT: NUMPARSE_FLAGS = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_PARENS: NUMPARSE_FLAGS = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_DECIMAL: NUMPARSE_FLAGS = 256u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_THOUSANDS: NUMPARSE_FLAGS = 512u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_CURRENCY: NUMPARSE_FLAGS = 1024u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_EXPONENT: NUMPARSE_FLAGS = 2048u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_USE_ALL: NUMPARSE_FLAGS = 4096u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_STD: NUMPARSE_FLAGS = 8191u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_NEG: NUMPARSE_FLAGS = 65536u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const NUMPRS_INEXACT: NUMPARSE_FLAGS = 131072u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OBJECT_PROPERTIES_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OPF_OBJECTISLINK: OBJECT_PROPERTIES_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OPF_NOFILLDEFAULT: OBJECT_PROPERTIES_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OPF_SHOWHELP: OBJECT_PROPERTIES_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OPF_DISABLECONVERT: OBJECT_PROPERTIES_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECLOSE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECLOSE_SAVEIFDIRTY: OLECLOSE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECLOSE_NOSAVE: OLECLOSE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECLOSE_PROMPTSAVE: OLECLOSE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDEXECOPT = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDEXECOPT_DODEFAULT: OLECMDEXECOPT = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDEXECOPT_PROMPTUSER: OLECMDEXECOPT = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDEXECOPT_DONTPROMPTUSER: OLECMDEXECOPT = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDEXECOPT_SHOWHELP: OLECMDEXECOPT = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDF = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_SUPPORTED: OLECMDF = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_ENABLED: OLECMDF = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_LATCHED: OLECMDF = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_NINCHED: OLECMDF = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_INVISIBLE: OLECMDF = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDF_DEFHIDEONCTXTMENU: OLECMDF = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_OPEN: OLECMDID = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_NEW: OLECMDID = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SAVE: OLECMDID = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SAVEAS: OLECMDID = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SAVECOPYAS: OLECMDID = 5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PRINT: OLECMDID = 6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PRINTPREVIEW: OLECMDID = 7i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PAGESETUP: OLECMDID = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SPELL: OLECMDID = 9i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PROPERTIES: OLECMDID = 10i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_CUT: OLECMDID = 11i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_COPY: OLECMDID = 12i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PASTE: OLECMDID = 13i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PASTESPECIAL: OLECMDID = 14i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UNDO: OLECMDID = 15i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_REDO: OLECMDID = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SELECTALL: OLECMDID = 17i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_CLEARSELECTION: OLECMDID = 18i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ZOOM: OLECMDID = 19i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_GETZOOMRANGE: OLECMDID = 20i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATECOMMANDS: OLECMDID = 21i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_REFRESH: OLECMDID = 22i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_STOP: OLECMDID = 23i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_HIDETOOLBARS: OLECMDID = 24i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETPROGRESSMAX: OLECMDID = 25i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETPROGRESSPOS: OLECMDID = 26i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETPROGRESSTEXT: OLECMDID = 27i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETTITLE: OLECMDID = 28i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETDOWNLOADSTATE: OLECMDID = 29i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_STOPDOWNLOAD: OLECMDID = 30i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ONTOOLBARACTIVATED: OLECMDID = 31i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_FIND: OLECMDID = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_DELETE: OLECMDID = 33i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_HTTPEQUIV: OLECMDID = 34i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_HTTPEQUIV_DONE: OLECMDID = 35i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ENABLE_INTERACTION: OLECMDID = 36i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ONUNLOAD: OLECMDID = 37i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PROPERTYBAG2: OLECMDID = 38i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PREREFRESH: OLECMDID = 39i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWSCRIPTERROR: OLECMDID = 40i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWMESSAGE: OLECMDID = 41i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWFIND: OLECMDID = 42i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWPAGESETUP: OLECMDID = 43i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWPRINT: OLECMDID = 44i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_CLOSE: OLECMDID = 45i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ALLOWUILESSSAVEAS: OLECMDID = 46i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_DONTDOWNLOADCSS: OLECMDID = 47i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATEPAGESTATUS: OLECMDID = 48i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PRINT2: OLECMDID = 49i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PRINTPREVIEW2: OLECMDID = 50i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETPRINTTEMPLATE: OLECMDID = 51i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_GETPRINTTEMPLATE: OLECMDID = 52i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PAGEACTIONBLOCKED: OLECMDID = 55i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PAGEACTIONUIQUERY: OLECMDID = 56i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_FOCUSVIEWCONTROLS: OLECMDID = 57i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_FOCUSVIEWCONTROLSQUERY: OLECMDID = 58i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWPAGEACTIONMENU: OLECMDID = 59i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ADDTRAVELENTRY: OLECMDID = 60i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATETRAVELENTRY: OLECMDID = 61i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATEBACKFORWARDSTATE: OLECMDID = 62i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_OPTICAL_ZOOM: OLECMDID = 63i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_OPTICAL_GETZOOMRANGE: OLECMDID = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_WINDOWSTATECHANGED: OLECMDID = 65i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ACTIVEXINSTALLSCOPE: OLECMDID = 66i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATETRAVELENTRY_DATARECOVERY: OLECMDID = 67i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWTASKDLG: OLECMDID = 68i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_POPSTATEEVENT: OLECMDID = 69i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_VIEWPORT_MODE: OLECMDID = 70i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_LAYOUT_VIEWPORT_WIDTH: OLECMDID = 71i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM: OLECMDID = 72i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_USER_OPTICAL_ZOOM: OLECMDID = 73i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_PAGEAVAILABLE: OLECMDID = 74i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_GETUSERSCALABLE: OLECMDID = 75i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_UPDATE_CARET: OLECMDID = 76i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ENABLE_VISIBILITY: OLECMDID = 77i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_MEDIA_PLAYBACK: OLECMDID = 78i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SETFAVICON: OLECMDID = 79i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SET_HOST_FULLSCREENMODE: OLECMDID = 80i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_EXITFULLSCREEN: OLECMDID = 81i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SCROLLCOMPLETE: OLECMDID = 82i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_ONBEFOREUNLOAD: OLECMDID = 83i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWMESSAGE_BLOCKABLE: OLECMDID = 84i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDID_SHOWTASKDLG_BLOCKABLE: OLECMDID = 85i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_BROWSERSTATEFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_EXTENSIONSOFF: OLECMDID_BROWSERSTATEFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_IESECURITY: OLECMDID_BROWSERSTATEFLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_PROTECTEDMODE_OFF: OLECMDID_BROWSERSTATEFLAG = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_RESET: OLECMDID_BROWSERSTATEFLAG = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_REQUIRESACTIVEX: OLECMDID_BROWSERSTATEFLAG = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_DESKTOPHTMLDIALOG: OLECMDID_BROWSERSTATEFLAG = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_BROWSERSTATE_BLOCKEDVERSION: OLECMDID_BROWSERSTATEFLAG = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_OPTICAL_ZOOMFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_OPTICAL_ZOOM_NOPERSIST: OLECMDID_OPTICAL_ZOOMFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_OPTICAL_ZOOM_NOLAYOUT: OLECMDID_OPTICAL_ZOOMFLAG = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_OPTICAL_ZOOM_NOTRANSIENT: OLECMDID_OPTICAL_ZOOMFLAG = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_OPTICAL_ZOOM_RELOADFORNEWTAB: OLECMDID_OPTICAL_ZOOMFLAG = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_PAGEACTIONFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_FILEDOWNLOAD: OLECMDID_PAGEACTIONFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXINSTALL: OLECMDID_PAGEACTIONFLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXTRUSTFAIL: OLECMDID_PAGEACTIONFLAG = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXUSERDISABLE: OLECMDID_PAGEACTIONFLAG = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXDISALLOW: OLECMDID_PAGEACTIONFLAG = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXUNSAFE: OLECMDID_PAGEACTIONFLAG = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_POPUPWINDOW: OLECMDID_PAGEACTIONFLAG = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_LOCALMACHINE: OLECMDID_PAGEACTIONFLAG = 128i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_MIMETEXTPLAIN: OLECMDID_PAGEACTIONFLAG = 256i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE: OLECMDID_PAGEACTIONFLAG = 512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE_ACTIVEXINSTALL: OLECMDID_PAGEACTIONFLAG = 512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNLOCALMACHINE: OLECMDID_PAGEACTIONFLAG = 1024i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNTRUSTED: OLECMDID_PAGEACTIONFLAG = 2048i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNINTRANET: OLECMDID_PAGEACTIONFLAG = 4096i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNINTERNET: OLECMDID_PAGEACTIONFLAG = 8192i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNRESTRICTED: OLECMDID_PAGEACTIONFLAG = 16384i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_PROTLOCKDOWNDENY: OLECMDID_PAGEACTIONFLAG = 32768i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_POPUPALLOWED: OLECMDID_PAGEACTIONFLAG = 65536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_SCRIPTPROMPT: OLECMDID_PAGEACTIONFLAG = 131072i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEXUSERAPPROVAL: OLECMDID_PAGEACTIONFLAG = 262144i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_MIXEDCONTENT: OLECMDID_PAGEACTIONFLAG = 524288i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_INVALID_CERT: OLECMDID_PAGEACTIONFLAG = 1048576i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_INTRANETZONEREQUEST: OLECMDID_PAGEACTIONFLAG = 2097152i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_XSSFILTERED: OLECMDID_PAGEACTIONFLAG = 4194304i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_SPOOFABLEIDNHOST: OLECMDID_PAGEACTIONFLAG = 8388608i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_ACTIVEX_EPM_INCOMPATIBLE: OLECMDID_PAGEACTIONFLAG = 16777216i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE_ACTIVEXUSERAPPROVAL: OLECMDID_PAGEACTIONFLAG = 33554432i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_WPCBLOCKED: OLECMDID_PAGEACTIONFLAG = 67108864i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_WPCBLOCKED_ACTIVEX: OLECMDID_PAGEACTIONFLAG = 134217728i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_EXTENSION_COMPAT_BLOCKED: OLECMDID_PAGEACTIONFLAG = 268435456i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_NORESETACTIVEX: OLECMDID_PAGEACTIONFLAG = 536870912i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_GENERIC_STATE: OLECMDID_PAGEACTIONFLAG = 1073741824i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_PAGEACTION_RESET: OLECMDID_PAGEACTIONFLAG = -2147483648i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_REFRESHFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_NORMAL: OLECMDID_REFRESHFLAG = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_IFEXPIRED: OLECMDID_REFRESHFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_CONTINUE: OLECMDID_REFRESHFLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_COMPLETELY: OLECMDID_REFRESHFLAG = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_NO_CACHE: OLECMDID_REFRESHFLAG = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_RELOAD: OLECMDID_REFRESHFLAG = 5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_LEVELMASK: OLECMDID_REFRESHFLAG = 255i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_CLEARUSERINPUT: OLECMDID_REFRESHFLAG = 4096i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PROMPTIFOFFLINE: OLECMDID_REFRESHFLAG = 8192i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_THROUGHSCRIPT: OLECMDID_REFRESHFLAG = 16384i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_SKIPBEFOREUNLOADEVENT: OLECMDID_REFRESHFLAG = 32768i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_ACTIVEXINSTALL: OLECMDID_REFRESHFLAG = 65536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_FILEDOWNLOAD: OLECMDID_REFRESHFLAG = 131072i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_LOCALMACHINE: OLECMDID_REFRESHFLAG = 262144i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_POPUPWINDOW: OLECMDID_REFRESHFLAG = 524288i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_PROTLOCKDOWNLOCALMACHINE: OLECMDID_REFRESHFLAG = 1048576i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_PROTLOCKDOWNTRUSTED: OLECMDID_REFRESHFLAG = 2097152i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_PROTLOCKDOWNINTRANET: OLECMDID_REFRESHFLAG = 4194304i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_PROTLOCKDOWNINTERNET: OLECMDID_REFRESHFLAG = 8388608i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_PROTLOCKDOWNRESTRICTED: OLECMDID_REFRESHFLAG = 16777216i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_MIXEDCONTENT: OLECMDID_REFRESHFLAG = 33554432i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_INVALID_CERT: OLECMDID_REFRESHFLAG = 67108864i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_REFRESH_PAGEACTION_ALLOW_VERSION: OLECMDID_REFRESHFLAG = 134217728i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_VIEWPORT_MODE_FLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_VIEWPORTMODE_FIXED_LAYOUT_WIDTH: OLECMDID_VIEWPORT_MODE_FLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_VIEWPORTMODE_EXCLUDE_VISUAL_BOTTOM: OLECMDID_VIEWPORT_MODE_FLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_VIEWPORTMODE_FIXED_LAYOUT_WIDTH_VALID: OLECMDID_VIEWPORT_MODE_FLAG = 65536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_VIEWPORTMODE_EXCLUDE_VISUAL_BOTTOM_VALID: OLECMDID_VIEWPORT_MODE_FLAG = 131072i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDID_WINDOWSTATE_FLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_WINDOWSTATE_USERVISIBLE: OLECMDID_WINDOWSTATE_FLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_WINDOWSTATE_ENABLED: OLECMDID_WINDOWSTATE_FLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_WINDOWSTATE_USERVISIBLE_VALID: OLECMDID_WINDOWSTATE_FLAG = 65536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDIDF_WINDOWSTATE_ENABLED_VALID: OLECMDID_WINDOWSTATE_FLAG = 131072i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECMDTEXTF = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDTEXTF_NONE: OLECMDTEXTF = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDTEXTF_NAME: OLECMDTEXTF = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECMDTEXTF_STATUS: OLECMDTEXTF = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECONTF = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECONTF_EMBEDDINGS: OLECONTF = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECONTF_LINKS: OLECONTF = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECONTF_OTHERS: OLECONTF = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECONTF_ONLYUSER: OLECONTF = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECONTF_ONLYIFRUNNING: OLECONTF = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLECREATE = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECREATE_ZERO: OLECREATE = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLECREATE_LEAVERUNNING: OLECREATE = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEDCFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEDC_NODRAW: OLEDCFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEDC_PAINTBKGND: OLEDCFLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEDC_OFFSCREEN: OLEDCFLAGS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEGETMONIKER = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEGETMONIKER_ONLYIFTHERE: OLEGETMONIKER = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEGETMONIKER_FORCEASSIGN: OLEGETMONIKER = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEGETMONIKER_UNASSIGN: OLEGETMONIKER = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEGETMONIKER_TEMPFORUSER: OLEGETMONIKER = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEIVERB = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_PRIMARY: OLEIVERB = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_SHOW: OLEIVERB = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_OPEN: OLEIVERB = -2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_HIDE: OLEIVERB = -3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_UIACTIVATE: OLEIVERB = -4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_INPLACEACTIVATE: OLEIVERB = -5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEIVERB_DISCARDUNDOSTATE: OLEIVERB = -6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLELINKBIND = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLELINKBIND_EVENIFCLASSDIFF: OLELINKBIND = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEMISC = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_RECOMPOSEONRESIZE: OLEMISC = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ONLYICONIC: OLEMISC = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_INSERTNOTREPLACE: OLEMISC = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_STATIC: OLEMISC = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_CANTLINKINSIDE: OLEMISC = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_CANLINKBYOLE1: OLEMISC = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ISLINKOBJECT: OLEMISC = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_INSIDEOUT: OLEMISC = 128i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ACTIVATEWHENVISIBLE: OLEMISC = 256i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_RENDERINGISDEVICEINDEPENDENT: OLEMISC = 512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_INVISIBLEATRUNTIME: OLEMISC = 1024i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ALWAYSRUN: OLEMISC = 2048i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ACTSLIKEBUTTON: OLEMISC = 4096i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ACTSLIKELABEL: OLEMISC = 8192i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_NOUIACTIVATE: OLEMISC = 16384i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_ALIGNABLE: OLEMISC = 32768i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_SIMPLEFRAME: OLEMISC = 65536i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_SETCLIENTSITEFIRST: OLEMISC = 131072i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_IMEMODE: OLEMISC = 262144i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_IGNOREACTIVATEWHENVISIBLE: OLEMISC = 524288i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_WANTSTOMENUMERGE: OLEMISC = 1048576i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEMISC_SUPPORTSMULTILEVELUNDO: OLEMISC = 2097152i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLERENDER = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLERENDER_NONE: OLERENDER = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLERENDER_DRAW: OLERENDER = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLERENDER_FORMAT: OLERENDER = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLERENDER_ASIS: OLERENDER = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEUIPASTEFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_ENABLEICON: OLEUIPASTEFLAG = 2048i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_PASTEONLY: OLEUIPASTEFLAG = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_PASTE: OLEUIPASTEFLAG = 512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKANYTYPE: OLEUIPASTEFLAG = 1024i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE1: OLEUIPASTEFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE2: OLEUIPASTEFLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE3: OLEUIPASTEFLAG = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE4: OLEUIPASTEFLAG = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE5: OLEUIPASTEFLAG = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE6: OLEUIPASTEFLAG = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE7: OLEUIPASTEFLAG = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUIPASTE_LINKTYPE8: OLEUIPASTEFLAG = 128i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEUPDATE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUPDATE_ALWAYS: OLEUPDATE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEUPDATE_ONCALL: OLEUPDATE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEVERBATTRIB = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEVERBATTRIB_NEVERDIRTIES: OLEVERBATTRIB = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEVERBATTRIB_ONCONTAINERMENU: OLEVERBATTRIB = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLEWHICHMK = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEWHICHMK_CONTAINER: OLEWHICHMK = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEWHICHMK_OBJREL: OLEWHICHMK = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const OLEWHICHMK_OBJFULL: OLEWHICHMK = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type OLE_TRISTATE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const triUnchecked: OLE_TRISTATE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const triChecked: OLE_TRISTATE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const triGray: OLE_TRISTATE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PAGEACTION_UI = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PAGEACTION_UI_DEFAULT: PAGEACTION_UI = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PAGEACTION_UI_MODAL: PAGEACTION_UI = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PAGEACTION_UI_MODELESS: PAGEACTION_UI = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PAGEACTION_UI_SILENT: PAGEACTION_UI = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PARAMFLAGS = u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_NONE: PARAMFLAGS = 0u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FIN: PARAMFLAGS = 1u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FOUT: PARAMFLAGS = 2u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FLCID: PARAMFLAGS = 4u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FRETVAL: PARAMFLAGS = 8u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FOPT: PARAMFLAGS = 16u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FHASDEFAULT: PARAMFLAGS = 32u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PARAMFLAG_FHASCUSTDATA: PARAMFLAGS = 64u16;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PASTE_SPECIAL_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_SHOWHELP: PASTE_SPECIAL_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_SELECTPASTE: PASTE_SPECIAL_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_SELECTPASTELINK: PASTE_SPECIAL_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_CHECKDISPLAYASICON: PASTE_SPECIAL_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_DISABLEDISPLAYASICON: PASTE_SPECIAL_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_HIDECHANGEICON: PASTE_SPECIAL_FLAGS = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_STAYONCLIPBOARDCHANGE: PASTE_SPECIAL_FLAGS = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PSF_NOREFRESHDATAOBJECT: PASTE_SPECIAL_FLAGS = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PICTUREATTRIBUTES = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTURE_SCALABLE: PICTUREATTRIBUTES = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTURE_TRANSPARENT: PICTUREATTRIBUTES = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PICTYPE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_UNINITIALIZED: PICTYPE = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_NONE: PICTYPE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_BITMAP: PICTYPE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_METAFILE: PICTYPE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_ICON: PICTYPE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PICTYPE_ENHMETAFILE: PICTYPE = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type POINTERINACTIVE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const POINTERINACTIVE_ACTIVATEONENTRY: POINTERINACTIVE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const POINTERINACTIVE_DEACTIVATEONLEAVE: POINTERINACTIVE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const POINTERINACTIVE_ACTIVATEONDRAG: POINTERINACTIVE = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PRINTFLAG = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_MAYBOTHERUSER: PRINTFLAG = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_PROMPTUSER: PRINTFLAG = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_USERMAYCHANGEPRINTER: PRINTFLAG = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_RECOMPOSETODEVICE: PRINTFLAG = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_DONTACTUALLYPRINT: PRINTFLAG = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_FORCEPROPERTIES: PRINTFLAG = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PRINTFLAG_PRINTTOFILE: PRINTFLAG = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PROPBAG2_TYPE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_UNDEFINED: PROPBAG2_TYPE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_DATA: PROPBAG2_TYPE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_URL: PROPBAG2_TYPE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_OBJECT: PROPBAG2_TYPE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_STREAM: PROPBAG2_TYPE = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_STORAGE: PROPBAG2_TYPE = 5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPBAG2_TYPE_MONIKER: PROPBAG2_TYPE = 6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type PROPPAGESTATUS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPPAGESTATUS_DIRTY: PROPPAGESTATUS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPPAGESTATUS_VALIDATE: PROPPAGESTATUS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const PROPPAGESTATUS_CLEAN: PROPPAGESTATUS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type QACONTAINERFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_SHOWHATCHING: QACONTAINERFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_SHOWGRABHANDLES: QACONTAINERFLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_USERMODE: QACONTAINERFLAGS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_DISPLAYASDEFAULT: QACONTAINERFLAGS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_UIDEAD: QACONTAINERFLAGS = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_AUTOCLIP: QACONTAINERFLAGS = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_MESSAGEREFLECT: QACONTAINERFLAGS = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const QACONTAINER_SUPPORTSMNEMONICS: QACONTAINERFLAGS = 128i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type READYSTATE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const READYSTATE_UNINITIALIZED: READYSTATE = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const READYSTATE_LOADING: READYSTATE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const READYSTATE_LOADED: READYSTATE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const READYSTATE_INTERACTIVE: READYSTATE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const READYSTATE_COMPLETE: READYSTATE = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type REGKIND = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const REGKIND_DEFAULT: REGKIND = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const REGKIND_REGISTER: REGKIND = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const REGKIND_NONE: REGKIND = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type SF_TYPE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_ERROR: SF_TYPE = 10i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_I1: SF_TYPE = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_I2: SF_TYPE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_I4: SF_TYPE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_I8: SF_TYPE = 20i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_BSTR: SF_TYPE = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_UNKNOWN: SF_TYPE = 13i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_DISPATCH: SF_TYPE = 9i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_VARIANT: SF_TYPE = 12i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_RECORD: SF_TYPE = 36i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const SF_HAVEIID: SF_TYPE = 32781i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type TYPEFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FAPPOBJECT: TYPEFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FCANCREATE: TYPEFLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FLICENSED: TYPEFLAGS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FPREDECLID: TYPEFLAGS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FHIDDEN: TYPEFLAGS = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FCONTROL: TYPEFLAGS = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FDUAL: TYPEFLAGS = 64i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FNONEXTENSIBLE: TYPEFLAGS = 128i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FOLEAUTOMATION: TYPEFLAGS = 256i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FRESTRICTED: TYPEFLAGS = 512i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FAGGREGATABLE: TYPEFLAGS = 1024i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FREPLACEABLE: TYPEFLAGS = 2048i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FDISPATCHABLE: TYPEFLAGS = 4096i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FREVERSEBIND: TYPEFLAGS = 8192i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const TYPEFLAG_FPROXY: TYPEFLAGS = 16384i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type UASFLAGS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UAS_NORMAL: UASFLAGS = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UAS_BLOCKED: UASFLAGS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UAS_NOPARENTENABLE: UASFLAGS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UAS_MASK: UASFLAGS = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type UI_CONVERT_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SHOWHELPBUTTON: UI_CONVERT_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SETCONVERTDEFAULT: UI_CONVERT_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SETACTIVATEDEFAULT: UI_CONVERT_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SELECTCONVERTTO: UI_CONVERT_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_SELECTACTIVATEAS: UI_CONVERT_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DISABLEDISPLAYASICON: UI_CONVERT_FLAGS = 32u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_DISABLEACTIVATEAS: UI_CONVERT_FLAGS = 64u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_HIDECHANGEICON: UI_CONVERT_FLAGS = 128u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const CF_CONVERTONLY: UI_CONVERT_FLAGS = 256u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type UPDFCACHE_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_ALL: UPDFCACHE_FLAGS = 2147483647u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_ALLBUTNODATACACHE: UPDFCACHE_FLAGS = 2147483646u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_NORMALCACHE: UPDFCACHE_FLAGS = 8u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_IFBLANK: UPDFCACHE_FLAGS = 16u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_ONLYIFBLANK: UPDFCACHE_FLAGS = 2147483648u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_NODATACACHE: UPDFCACHE_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_ONSAVECACHE: UPDFCACHE_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_ONSTOPCACHE: UPDFCACHE_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const UPDFCACHE_IFBLANKORONSAVECACHE: UPDFCACHE_FLAGS = 18u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type USERCLASSTYPE = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const USERCLASSTYPE_FULL: USERCLASSTYPE = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const USERCLASSTYPE_SHORT: USERCLASSTYPE = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const USERCLASSTYPE_APPNAME: USERCLASSTYPE = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARCMP = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARCMP_LT: VARCMP = 0u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARCMP_EQ: VARCMP = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARCMP_GT: VARCMP = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARCMP_NULL: VARCMP = 3u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_FIRST_DAY = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_SYSTEMDEFAULT: VARFORMAT_FIRST_DAY = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_MONDAY: VARFORMAT_FIRST_DAY = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_TUESDAY: VARFORMAT_FIRST_DAY = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_WEDNESDAY: VARFORMAT_FIRST_DAY = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_THURSDAY: VARFORMAT_FIRST_DAY = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_FRIDAY: VARFORMAT_FIRST_DAY = 5i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_SATURDAY: VARFORMAT_FIRST_DAY = 6i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_DAY_SUNDAY: VARFORMAT_FIRST_DAY = 7i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_FIRST_WEEK = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_WEEK_SYSTEMDEFAULT: VARFORMAT_FIRST_WEEK = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_WEEK_CONTAINS_JANUARY_FIRST: VARFORMAT_FIRST_WEEK = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_WEEK_LARGER_HALF_IN_CURRENT_YEAR: VARFORMAT_FIRST_WEEK = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_FIRST_WEEK_HAS_SEVEN_DAYS: VARFORMAT_FIRST_WEEK = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_GROUP = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_GROUP_SYSTEMDEFAULT: VARFORMAT_GROUP = -2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_GROUP_THOUSANDS: VARFORMAT_GROUP = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_GROUP_NOTTHOUSANDS: VARFORMAT_GROUP = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_LEADING_DIGIT = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_LEADING_DIGIT_SYSTEMDEFAULT: VARFORMAT_LEADING_DIGIT = -2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_LEADING_DIGIT_INCLUDED: VARFORMAT_LEADING_DIGIT = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_LEADING_DIGIT_NOTINCLUDED: VARFORMAT_LEADING_DIGIT = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_NAMED_FORMAT = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_NAMED_FORMAT_GENERALDATE: VARFORMAT_NAMED_FORMAT = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_NAMED_FORMAT_LONGDATE: VARFORMAT_NAMED_FORMAT = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_NAMED_FORMAT_SHORTDATE: VARFORMAT_NAMED_FORMAT = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_NAMED_FORMAT_LONGTIME: VARFORMAT_NAMED_FORMAT = 3i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_NAMED_FORMAT_SHORTTIME: VARFORMAT_NAMED_FORMAT = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VARFORMAT_PARENTHESES = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_PARENTHESES_SYSTEMDEFAULT: VARFORMAT_PARENTHESES = -2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_PARENTHESES_USED: VARFORMAT_PARENTHESES = -1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VARFORMAT_PARENTHESES_NOTUSED: VARFORMAT_PARENTHESES = 0i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VIEWSTATUS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_OPAQUE: VIEWSTATUS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_SOLIDBKGND: VIEWSTATUS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_DVASPECTOPAQUE: VIEWSTATUS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_DVASPECTTRANSPARENT: VIEWSTATUS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_SURFACE: VIEWSTATUS = 16i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VIEWSTATUS_3DSURFACE: VIEWSTATUS = 32i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type VIEW_OBJECT_PROPERTIES_FLAGS = u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VPF_SELECTRELATIVE: VIEW_OBJECT_PROPERTIES_FLAGS = 1u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VPF_DISABLERELATIVE: VIEW_OBJECT_PROPERTIES_FLAGS = 2u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const VPF_DISABLESCALE: VIEW_OBJECT_PROPERTIES_FLAGS = 4u32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type WPCSETTING = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const WPCSETTING_LOGGING_ENABLED: WPCSETTING = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const WPCSETTING_FILEDOWNLOAD_BLOCKED: WPCSETTING = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub type XFORMCOORDS = i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const XFORMCOORDS_POSITION: XFORMCOORDS = 1i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const XFORMCOORDS_SIZE: XFORMCOORDS = 2i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const XFORMCOORDS_HIMETRICTOCONTAINER: XFORMCOORDS = 4i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const XFORMCOORDS_CONTAINERTOHIMETRIC: XFORMCOORDS = 8i32;
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub const XFORMCOORDS_EVENTCOMPAT: XFORMCOORDS = 16i32;
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct ARRAYDESC {
pub tdescElem: super::Com::TYPEDESC,
pub cDims: u16,
pub rgbounds: [super::Com::SAFEARRAYBOUND; 1],
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for ARRAYDESC {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for ARRAYDESC {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct CADWORD {
pub cElems: u32,
pub pElems: *mut u32,
}
impl ::core::marker::Copy for CADWORD {}
impl ::core::clone::Clone for CADWORD {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct CALPOLESTR {
pub cElems: u32,
pub pElems: *mut ::windows_sys::core::PWSTR,
}
impl ::core::marker::Copy for CALPOLESTR {}
impl ::core::clone::Clone for CALPOLESTR {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct CAUUID {
pub cElems: u32,
pub pElems: *mut ::windows_sys::core::GUID,
}
impl ::core::marker::Copy for CAUUID {}
impl ::core::clone::Clone for CAUUID {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct CLEANLOCALSTORAGE {
pub pInterface: ::windows_sys::core::IUnknown,
pub pStorage: *mut ::core::ffi::c_void,
pub flags: u32,
}
impl ::core::marker::Copy for CLEANLOCALSTORAGE {}
impl ::core::clone::Clone for CLEANLOCALSTORAGE {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
pub struct CONTROLINFO {
pub cb: u32,
pub hAccel: super::super::UI::WindowsAndMessaging::HACCEL,
pub cAccel: u16,
pub dwFlags: CTRLINFO,
}
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
impl ::core::marker::Copy for CONTROLINFO {}
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
impl ::core::clone::Clone for CONTROLINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct DVASPECTINFO {
pub cb: u32,
pub dwFlags: u32,
}
impl ::core::marker::Copy for DVASPECTINFO {}
impl ::core::clone::Clone for DVASPECTINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct DVEXTENTINFO {
pub cb: u32,
pub dwExtentMode: u32,
pub sizelProposed: super::super::Foundation::SIZE,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for DVEXTENTINFO {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for DVEXTENTINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct FONTDESC {
pub cbSizeofstruct: u32,
pub lpstrName: ::windows_sys::core::PWSTR,
pub cySize: super::Com::CY,
pub sWeight: i16,
pub sCharset: i16,
pub fItalic: super::super::Foundation::BOOL,
pub fUnderline: super::super::Foundation::BOOL,
pub fStrikethrough: super::super::Foundation::BOOL,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for FONTDESC {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for FONTDESC {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct INTERFACEDATA {
pub pmethdata: *mut METHODDATA,
pub cMembers: u32,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for INTERFACEDATA {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for INTERFACEDATA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct LICINFO {
pub cbLicInfo: i32,
pub fRuntimeKeyAvail: super::super::Foundation::BOOL,
pub fLicVerified: super::super::Foundation::BOOL,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for LICINFO {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for LICINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct METHODDATA {
pub szName: ::windows_sys::core::PWSTR,
pub ppdata: *mut PARAMDATA,
pub dispid: i32,
pub iMeth: u32,
pub cc: super::Com::CALLCONV,
pub cArgs: u32,
pub wFlags: u16,
pub vtReturn: super::Com::VARENUM,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for METHODDATA {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for METHODDATA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct NUMPARSE {
pub cDig: i32,
pub dwInFlags: NUMPARSE_FLAGS,
pub dwOutFlags: NUMPARSE_FLAGS,
pub cchUsed: i32,
pub nBaseShift: i32,
pub nPwr10: i32,
}
impl ::core::marker::Copy for NUMPARSE {}
impl ::core::clone::Clone for NUMPARSE {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OBJECTDESCRIPTOR {
pub cbSize: u32,
pub clsid: ::windows_sys::core::GUID,
pub dwDrawAspect: u32,
pub sizel: super::super::Foundation::SIZE,
pub pointl: super::super::Foundation::POINTL,
pub dwStatus: u32,
pub dwFullUserTypeName: u32,
pub dwSrcOfCopy: u32,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OBJECTDESCRIPTOR {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OBJECTDESCRIPTOR {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OCPFIPARAMS {
pub cbStructSize: u32,
pub hWndOwner: super::super::Foundation::HWND,
pub x: i32,
pub y: i32,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub cObjects: u32,
pub lplpUnk: *mut ::windows_sys::core::IUnknown,
pub cPages: u32,
pub lpPages: *mut ::windows_sys::core::GUID,
pub lcid: u32,
pub dispidInitialProperty: i32,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OCPFIPARAMS {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OCPFIPARAMS {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct OLECMD {
pub cmdID: OLECMDID,
pub cmdf: OLECMDF,
}
impl ::core::marker::Copy for OLECMD {}
impl ::core::clone::Clone for OLECMD {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct OLECMDTEXT {
pub cmdtextf: u32,
pub cwActual: u32,
pub cwBuf: u32,
pub rgwz: [u16; 1],
}
impl ::core::marker::Copy for OLECMDTEXT {}
impl ::core::clone::Clone for OLECMDTEXT {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEINPLACEFRAMEINFO {
pub cb: u32,
pub fMDIApp: super::super::Foundation::BOOL,
pub hwndFrame: super::super::Foundation::HWND,
pub haccel: super::super::UI::WindowsAndMessaging::HACCEL,
pub cAccelEntries: u32,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEINPLACEFRAMEINFO {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEINPLACEFRAMEINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct OLEMENUGROUPWIDTHS {
pub width: [i32; 6],
}
impl ::core::marker::Copy for OLEMENUGROUPWIDTHS {}
impl ::core::clone::Clone for OLEMENUGROUPWIDTHS {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Media\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
pub struct OLEUIBUSYA {
pub cbStruct: u32,
pub dwFlags: BUSY_DIALOG_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub hTask: super::super::Media::HTASK,
pub lphWndDialog: *mut super::super::Foundation::HWND,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
impl ::core::marker::Copy for OLEUIBUSYA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
impl ::core::clone::Clone for OLEUIBUSYA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Media\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
pub struct OLEUIBUSYW {
pub cbStruct: u32,
pub dwFlags: BUSY_DIALOG_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub hTask: super::super::Media::HTASK,
pub lphWndDialog: *mut super::super::Foundation::HWND,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
impl ::core::marker::Copy for OLEUIBUSYW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media"))]
impl ::core::clone::Clone for OLEUIBUSYW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUICHANGEICONA {
pub cbStruct: u32,
pub dwFlags: CHANGE_ICON_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub clsid: ::windows_sys::core::GUID,
pub szIconExe: [u8; 260],
pub cchIconExe: i32,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUICHANGEICONA {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUICHANGEICONA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUICHANGEICONW {
pub cbStruct: u32,
pub dwFlags: CHANGE_ICON_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub clsid: ::windows_sys::core::GUID,
pub szIconExe: [u16; 260],
pub cchIconExe: i32,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUICHANGEICONW {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUICHANGEICONW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls_Dialogs\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
pub struct OLEUICHANGESOURCEA {
pub cbStruct: u32,
pub dwFlags: CHANGE_SOURCE_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpOFN: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEA,
pub dwReserved1: [u32; 4],
pub lpOleUILinkContainer: IOleUILinkContainerA,
pub dwLink: u32,
pub lpszDisplayName: ::windows_sys::core::PSTR,
pub nFileLength: u32,
pub lpszFrom: ::windows_sys::core::PSTR,
pub lpszTo: ::windows_sys::core::PSTR,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
impl ::core::marker::Copy for OLEUICHANGESOURCEA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
impl ::core::clone::Clone for OLEUICHANGESOURCEA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls_Dialogs\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
pub struct OLEUICHANGESOURCEW {
pub cbStruct: u32,
pub dwFlags: CHANGE_SOURCE_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpOFN: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEW,
pub dwReserved1: [u32; 4],
pub lpOleUILinkContainer: IOleUILinkContainerW,
pub dwLink: u32,
pub lpszDisplayName: ::windows_sys::core::PWSTR,
pub nFileLength: u32,
pub lpszFrom: ::windows_sys::core::PWSTR,
pub lpszTo: ::windows_sys::core::PWSTR,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
impl ::core::marker::Copy for OLEUICHANGESOURCEW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls_Dialogs"))]
impl ::core::clone::Clone for OLEUICHANGESOURCEW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUICONVERTA {
pub cbStruct: u32,
pub dwFlags: UI_CONVERT_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub clsid: ::windows_sys::core::GUID,
pub clsidConvertDefault: ::windows_sys::core::GUID,
pub clsidActivateDefault: ::windows_sys::core::GUID,
pub clsidNew: ::windows_sys::core::GUID,
pub dvAspect: u32,
pub wFormat: u16,
pub fIsLinkedObject: super::super::Foundation::BOOL,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub lpszUserType: ::windows_sys::core::PSTR,
pub fObjectsIconChanged: super::super::Foundation::BOOL,
pub lpszDefLabel: ::windows_sys::core::PSTR,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUICONVERTA {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUICONVERTA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUICONVERTW {
pub cbStruct: u32,
pub dwFlags: UI_CONVERT_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub clsid: ::windows_sys::core::GUID,
pub clsidConvertDefault: ::windows_sys::core::GUID,
pub clsidActivateDefault: ::windows_sys::core::GUID,
pub clsidNew: ::windows_sys::core::GUID,
pub dvAspect: u32,
pub wFormat: u16,
pub fIsLinkedObject: super::super::Foundation::BOOL,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub lpszUserType: ::windows_sys::core::PWSTR,
pub fObjectsIconChanged: super::super::Foundation::BOOL,
pub lpszDefLabel: ::windows_sys::core::PWSTR,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUICONVERTW {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUICONVERTW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUIEDITLINKSA {
pub cbStruct: u32,
pub dwFlags: EDIT_LINKS_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpOleUILinkContainer: IOleUILinkContainerA,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUIEDITLINKSA {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUIEDITLINKSA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct OLEUIEDITLINKSW {
pub cbStruct: u32,
pub dwFlags: EDIT_LINKS_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpOleUILinkContainer: IOleUILinkContainerW,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for OLEUIEDITLINKSW {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for OLEUIEDITLINKSW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIGNRLPROPSA {
pub cbStruct: u32,
pub dwFlags: u32,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSA,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIGNRLPROPSA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIGNRLPROPSA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIGNRLPROPSW {
pub cbStruct: u32,
pub dwFlags: u32,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSW,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIGNRLPROPSW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIGNRLPROPSW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub struct OLEUIINSERTOBJECTA {
pub cbStruct: u32,
pub dwFlags: INSERT_OBJECT_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub clsid: ::windows_sys::core::GUID,
pub lpszFile: ::windows_sys::core::PSTR,
pub cchFile: u32,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
pub iid: ::windows_sys::core::GUID,
pub oleRender: u32,
pub lpFormatEtc: *mut super::Com::FORMATETC,
pub lpIOleClientSite: IOleClientSite,
pub lpIStorage: super::Com::StructuredStorage::IStorage,
pub ppvObj: *mut *mut ::core::ffi::c_void,
pub sc: i32,
pub hMetaPict: super::super::Foundation::HGLOBAL,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::core::marker::Copy for OLEUIINSERTOBJECTA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::core::clone::Clone for OLEUIINSERTOBJECTA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub struct OLEUIINSERTOBJECTW {
pub cbStruct: u32,
pub dwFlags: INSERT_OBJECT_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub clsid: ::windows_sys::core::GUID,
pub lpszFile: ::windows_sys::core::PWSTR,
pub cchFile: u32,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
pub iid: ::windows_sys::core::GUID,
pub oleRender: u32,
pub lpFormatEtc: *mut super::Com::FORMATETC,
pub lpIOleClientSite: IOleClientSite,
pub lpIStorage: super::Com::StructuredStorage::IStorage,
pub ppvObj: *mut *mut ::core::ffi::c_void,
pub sc: i32,
pub hMetaPict: super::super::Foundation::HGLOBAL,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::core::marker::Copy for OLEUIINSERTOBJECTW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::core::clone::Clone for OLEUIINSERTOBJECTW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUILINKPROPSA {
pub cbStruct: u32,
pub dwFlags: u32,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSA,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUILINKPROPSA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUILINKPROPSA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUILINKPROPSW {
pub cbStruct: u32,
pub dwFlags: u32,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSW,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUILINKPROPSW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUILINKPROPSW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIOBJECTPROPSA {
pub cbStruct: u32,
pub dwFlags: OBJECT_PROPERTIES_FLAGS,
pub lpPS: *mut super::super::UI::Controls::PROPSHEETHEADERA_V2,
pub dwObject: u32,
pub lpObjInfo: IOleUIObjInfoA,
pub dwLink: u32,
pub lpLinkInfo: IOleUILinkInfoA,
pub lpGP: *mut OLEUIGNRLPROPSA,
pub lpVP: *mut OLEUIVIEWPROPSA,
pub lpLP: *mut OLEUILINKPROPSA,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIOBJECTPROPSA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIOBJECTPROPSA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIOBJECTPROPSW {
pub cbStruct: u32,
pub dwFlags: OBJECT_PROPERTIES_FLAGS,
pub lpPS: *mut super::super::UI::Controls::PROPSHEETHEADERW_V2,
pub dwObject: u32,
pub lpObjInfo: IOleUIObjInfoW,
pub dwLink: u32,
pub lpLinkInfo: IOleUILinkInfoW,
pub lpGP: *mut OLEUIGNRLPROPSW,
pub lpVP: *mut OLEUIVIEWPROPSW,
pub lpLP: *mut OLEUILINKPROPSW,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIOBJECTPROPSW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIOBJECTPROPSW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct OLEUIPASTEENTRYA {
pub fmtetc: super::Com::FORMATETC,
pub lpstrFormatName: ::windows_sys::core::PCSTR,
pub lpstrResultText: ::windows_sys::core::PCSTR,
pub dwFlags: u32,
pub dwScratchSpace: u32,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for OLEUIPASTEENTRYA {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for OLEUIPASTEENTRYA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct OLEUIPASTEENTRYW {
pub fmtetc: super::Com::FORMATETC,
pub lpstrFormatName: ::windows_sys::core::PCWSTR,
pub lpstrResultText: ::windows_sys::core::PCWSTR,
pub dwFlags: u32,
pub dwScratchSpace: u32,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for OLEUIPASTEENTRYW {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for OLEUIPASTEENTRYW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct OLEUIPASTESPECIALA {
pub cbStruct: u32,
pub dwFlags: PASTE_SPECIAL_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpSrcDataObj: super::Com::IDataObject,
pub arrPasteEntries: *mut OLEUIPASTEENTRYA,
pub cPasteEntries: i32,
pub arrLinkTypes: *mut u32,
pub cLinkTypes: i32,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
pub nSelectedIndex: i32,
pub fLink: super::super::Foundation::BOOL,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub sizel: super::super::Foundation::SIZE,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for OLEUIPASTESPECIALA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for OLEUIPASTESPECIALA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct OLEUIPASTESPECIALW {
pub cbStruct: u32,
pub dwFlags: PASTE_SPECIAL_FLAGS,
pub hWndOwner: super::super::Foundation::HWND,
pub lpszCaption: ::windows_sys::core::PCWSTR,
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub hInstance: super::super::Foundation::HMODULE,
pub lpszTemplate: ::windows_sys::core::PCWSTR,
pub hResource: super::super::Foundation::HRSRC,
pub lpSrcDataObj: super::Com::IDataObject,
pub arrPasteEntries: *mut OLEUIPASTEENTRYW,
pub cPasteEntries: i32,
pub arrLinkTypes: *mut u32,
pub cLinkTypes: i32,
pub cClsidExclude: u32,
pub lpClsidExclude: *mut ::windows_sys::core::GUID,
pub nSelectedIndex: i32,
pub fLink: super::super::Foundation::BOOL,
pub hMetaPict: super::super::Foundation::HGLOBAL,
pub sizel: super::super::Foundation::SIZE,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for OLEUIPASTESPECIALW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for OLEUIPASTESPECIALW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIVIEWPROPSA {
pub cbStruct: u32,
pub dwFlags: VIEW_OBJECT_PROPERTIES_FLAGS,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSA,
pub nScaleMin: i32,
pub nScaleMax: i32,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIVIEWPROPSA {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIVIEWPROPSA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIVIEWPROPSW {
pub cbStruct: u32,
pub dwFlags: VIEW_OBJECT_PROPERTIES_FLAGS,
pub dwReserved1: [u32; 2],
pub lpfnHook: LPFNOLEUIHOOK,
pub lCustData: super::super::Foundation::LPARAM,
pub dwReserved2: [u32; 3],
pub lpOP: *mut OLEUIOBJECTPROPSW,
pub nScaleMin: i32,
pub nScaleMax: i32,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for OLEUIVIEWPROPSW {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for OLEUIVIEWPROPSW {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
pub struct OLEVERB {
pub lVerb: OLEIVERB,
pub lpszVerbName: ::windows_sys::core::PWSTR,
pub fuFlags: super::super::UI::WindowsAndMessaging::MENU_ITEM_FLAGS,
pub grfAttribs: OLEVERBATTRIB,
}
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
impl ::core::marker::Copy for OLEVERB {}
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
impl ::core::clone::Clone for OLEVERB {
fn clone(&self) -> Self {
*self
}
}
pub type OLE_HANDLE = u32;
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct PAGERANGE {
pub nFromPage: i32,
pub nToPage: i32,
}
impl ::core::marker::Copy for PAGERANGE {}
impl ::core::clone::Clone for PAGERANGE {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct PAGESET {
pub cbStruct: u32,
pub fOddPages: super::super::Foundation::BOOL,
pub fEvenPages: super::super::Foundation::BOOL,
pub cPageRange: u32,
pub rgPages: [PAGERANGE; 1],
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for PAGESET {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for PAGESET {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct PARAMDATA {
pub szName: ::windows_sys::core::PWSTR,
pub vt: super::Com::VARENUM,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for PARAMDATA {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for PARAMDATA {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct PARAMDESC {
pub pparamdescex: *mut PARAMDESCEX,
pub wParamFlags: PARAMFLAGS,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for PARAMDESC {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for PARAMDESC {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct PARAMDESCEX {
pub cBytes: u32,
pub varDefaultValue: super::Com::VARIANT,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for PARAMDESCEX {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for PARAMDESCEX {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct PICTDESC {
pub cbSizeofstruct: u32,
pub picType: PICTYPE,
pub Anonymous: PICTDESC_0,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub union PICTDESC_0 {
pub bmp: PICTDESC_0_0,
pub wmf: PICTDESC_0_3,
pub icon: PICTDESC_0_2,
pub emf: PICTDESC_0_1,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC_0 {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC_0 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct PICTDESC_0_0 {
pub hbitmap: super::super::Graphics::Gdi::HBITMAP,
pub hpal: super::super::Graphics::Gdi::HPALETTE,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC_0_0 {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC_0_0 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct PICTDESC_0_1 {
pub hemf: super::super::Graphics::Gdi::HENHMETAFILE,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC_0_1 {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC_0_1 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct PICTDESC_0_2 {
pub hicon: super::super::UI::WindowsAndMessaging::HICON,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC_0_2 {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC_0_2 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct PICTDESC_0_3 {
pub hmeta: super::super::Graphics::Gdi::HMETAFILE,
pub xExt: i32,
pub yExt: i32,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::marker::Copy for PICTDESC_0_3 {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
impl ::core::clone::Clone for PICTDESC_0_3 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct POINTF {
pub x: f32,
pub y: f32,
}
impl ::core::marker::Copy for POINTF {}
impl ::core::clone::Clone for POINTF {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct PROPPAGEINFO {
pub cb: u32,
pub pszTitle: ::windows_sys::core::PWSTR,
pub size: super::super::Foundation::SIZE,
pub pszDocString: ::windows_sys::core::PWSTR,
pub pszHelpFile: ::windows_sys::core::PWSTR,
pub dwHelpContext: u32,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for PROPPAGEINFO {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for PROPPAGEINFO {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))]
pub struct QACONTAINER {
pub cbSize: u32,
pub pClientSite: IOleClientSite,
pub pAdviseSink: IAdviseSinkEx,
pub pPropertyNotifySink: IPropertyNotifySink,
pub pUnkEventSink: ::windows_sys::core::IUnknown,
pub dwAmbientFlags: QACONTAINERFLAGS,
pub colorFore: u32,
pub colorBack: u32,
pub pFont: IFont,
pub pUndoMgr: IOleUndoManager,
pub dwAppearance: u32,
pub lcid: i32,
pub hpal: super::super::Graphics::Gdi::HPALETTE,
pub pBindHost: super::Com::IBindHost,
pub pOleControlSite: IOleControlSite,
pub pServiceProvider: super::Com::IServiceProvider,
}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for QACONTAINER {}
#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for QACONTAINER {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct QACONTROL {
pub cbSize: u32,
pub dwMiscStatus: OLEMISC,
pub dwViewStatus: VIEWSTATUS,
pub dwEventCookie: u32,
pub dwPropNotifyCookie: u32,
pub dwPointerActivationPolicy: POINTERINACTIVE,
}
impl ::core::marker::Copy for QACONTROL {}
impl ::core::clone::Clone for QACONTROL {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct SAFEARRAYUNION {
pub sfType: u32,
pub u: SAFEARRAYUNION_0,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for SAFEARRAYUNION {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for SAFEARRAYUNION {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub union SAFEARRAYUNION_0 {
pub BstrStr: SAFEARR_BSTR,
pub UnknownStr: SAFEARR_UNKNOWN,
pub DispatchStr: SAFEARR_DISPATCH,
pub VariantStr: SAFEARR_VARIANT,
pub RecordStr: SAFEARR_BRECORD,
pub HaveIidStr: SAFEARR_HAVEIID,
pub ByteStr: super::Com::BYTE_SIZEDARR,
pub WordStr: super::Com::WORD_SIZEDARR,
pub LongStr: super::Com::DWORD_SIZEDARR,
pub HyperStr: super::Com::HYPER_SIZEDARR,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for SAFEARRAYUNION_0 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for SAFEARRAYUNION_0 {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct SAFEARR_BRECORD {
pub Size: u32,
pub aRecord: *mut *mut _wireBRECORD,
}
impl ::core::marker::Copy for SAFEARR_BRECORD {}
impl ::core::clone::Clone for SAFEARR_BRECORD {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct SAFEARR_BSTR {
pub Size: u32,
pub aBstr: *mut *mut super::Com::FLAGGED_WORD_BLOB,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for SAFEARR_BSTR {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for SAFEARR_BSTR {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_System_Com\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub struct SAFEARR_DISPATCH {
pub Size: u32,
pub apDispatch: *mut super::Com::IDispatch,
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::marker::Copy for SAFEARR_DISPATCH {}
#[cfg(feature = "Win32_System_Com")]
impl ::core::clone::Clone for SAFEARR_DISPATCH {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct SAFEARR_HAVEIID {
pub Size: u32,
pub apUnknown: *mut ::windows_sys::core::IUnknown,
pub iid: ::windows_sys::core::GUID,
}
impl ::core::marker::Copy for SAFEARR_HAVEIID {}
impl ::core::clone::Clone for SAFEARR_HAVEIID {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct SAFEARR_UNKNOWN {
pub Size: u32,
pub apUnknown: *mut ::windows_sys::core::IUnknown,
}
impl ::core::marker::Copy for SAFEARR_UNKNOWN {}
impl ::core::clone::Clone for SAFEARR_UNKNOWN {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct SAFEARR_VARIANT {
pub Size: u32,
pub aVariant: *mut *mut _wireVARIANT,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for SAFEARR_VARIANT {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for SAFEARR_VARIANT {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub struct UDATE {
pub st: super::super::Foundation::SYSTEMTIME,
pub wDayOfYear: u16,
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::marker::Copy for UDATE {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for UDATE {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`*"]
pub struct _wireBRECORD {
pub fFlags: u32,
pub clSize: u32,
pub pRecInfo: IRecordInfo,
pub pRecord: *mut u8,
}
impl ::core::marker::Copy for _wireBRECORD {}
impl ::core::clone::Clone for _wireBRECORD {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct _wireSAFEARRAY {
pub cDims: u16,
pub fFeatures: u16,
pub cbElements: u32,
pub cLocks: u32,
pub uArrayStructs: SAFEARRAYUNION,
pub rgsabound: [super::Com::SAFEARRAYBOUND; 1],
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for _wireSAFEARRAY {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for _wireSAFEARRAY {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub struct _wireVARIANT {
pub clSize: u32,
pub rpcReserved: u32,
pub vt: u16,
pub wReserved1: u16,
pub wReserved2: u16,
pub wReserved3: u16,
pub Anonymous: _wireVARIANT_0,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for _wireVARIANT {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for _wireVARIANT {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub union _wireVARIANT_0 {
pub llVal: i64,
pub lVal: i32,
pub bVal: u8,
pub iVal: i16,
pub fltVal: f32,
pub dblVal: f64,
pub boolVal: super::super::Foundation::VARIANT_BOOL,
pub scode: i32,
pub cyVal: super::Com::CY,
pub date: f64,
pub bstrVal: *mut super::Com::FLAGGED_WORD_BLOB,
pub punkVal: ::windows_sys::core::IUnknown,
pub pdispVal: super::Com::IDispatch,
pub parray: *mut *mut _wireSAFEARRAY,
pub brecVal: *mut _wireBRECORD,
pub pbVal: *mut u8,
pub piVal: *mut i16,
pub plVal: *mut i32,
pub pllVal: *mut i64,
pub pfltVal: *mut f32,
pub pdblVal: *mut f64,
pub pboolVal: *mut super::super::Foundation::VARIANT_BOOL,
pub pscode: *mut i32,
pub pcyVal: *mut super::Com::CY,
pub pdate: *mut f64,
pub pbstrVal: *mut *mut super::Com::FLAGGED_WORD_BLOB,
pub ppunkVal: *mut ::windows_sys::core::IUnknown,
pub ppdispVal: *mut super::Com::IDispatch,
pub pparray: *mut *mut *mut _wireSAFEARRAY,
pub pvarVal: *mut *mut _wireVARIANT,
pub cVal: u8,
pub uiVal: u16,
pub ulVal: u32,
pub ullVal: u64,
pub intVal: i32,
pub uintVal: u32,
pub decVal: super::super::Foundation::DECIMAL,
pub pdecVal: *mut super::super::Foundation::DECIMAL,
pub pcVal: ::windows_sys::core::PSTR,
pub puiVal: *mut u16,
pub pulVal: *mut u32,
pub pullVal: *mut u64,
pub pintVal: *mut i32,
pub puintVal: *mut u32,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::marker::Copy for _wireVARIANT_0 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
impl ::core::clone::Clone for _wireVARIANT_0 {
fn clone(&self) -> Self {
*self
}
}
#[doc = "*Required features: `\"Win32_System_Ole\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub type LPFNOLEUIHOOK = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HWND, param1: u32, param2: super::super::Foundation::WPARAM, param3: super::super::Foundation::LPARAM) -> u32>;
|
use crate::filter::with_table;
use crate::TableData;
use model::TablesFormat;
use warp::filters::BoxedFilter;
use warp::path;
use warp::{Filter, Rejection, Reply};
pub fn route(tables: &TableData) -> BoxedFilter<(impl Reply,)> {
warp::get()
.and(path("tables"))
.and(with_table(tables))
.and_then(table_handler)
.boxed()
}
async fn table_handler(tables: TableData) -> std::result::Result<impl Reply, Rejection> {
let tables = tables.lock().await;
Ok(serde_json::to_string(&TablesFormat::format(&tables)).unwrap())
}
|
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
#[link(name = "windows")]
extern "system" {}
pub type IOpcCertificateEnumerator = *mut ::core::ffi::c_void;
pub type IOpcCertificateSet = *mut ::core::ffi::c_void;
pub type IOpcDigitalSignature = *mut ::core::ffi::c_void;
pub type IOpcDigitalSignatureEnumerator = *mut ::core::ffi::c_void;
pub type IOpcDigitalSignatureManager = *mut ::core::ffi::c_void;
pub type IOpcFactory = *mut ::core::ffi::c_void;
pub type IOpcPackage = *mut ::core::ffi::c_void;
pub type IOpcPart = *mut ::core::ffi::c_void;
pub type IOpcPartEnumerator = *mut ::core::ffi::c_void;
pub type IOpcPartSet = *mut ::core::ffi::c_void;
pub type IOpcPartUri = *mut ::core::ffi::c_void;
pub type IOpcRelationship = *mut ::core::ffi::c_void;
pub type IOpcRelationshipEnumerator = *mut ::core::ffi::c_void;
pub type IOpcRelationshipSelector = *mut ::core::ffi::c_void;
pub type IOpcRelationshipSelectorEnumerator = *mut ::core::ffi::c_void;
pub type IOpcRelationshipSelectorSet = *mut ::core::ffi::c_void;
pub type IOpcRelationshipSet = *mut ::core::ffi::c_void;
pub type IOpcSignatureCustomObject = *mut ::core::ffi::c_void;
pub type IOpcSignatureCustomObjectEnumerator = *mut ::core::ffi::c_void;
pub type IOpcSignatureCustomObjectSet = *mut ::core::ffi::c_void;
pub type IOpcSignaturePartReference = *mut ::core::ffi::c_void;
pub type IOpcSignaturePartReferenceEnumerator = *mut ::core::ffi::c_void;
pub type IOpcSignaturePartReferenceSet = *mut ::core::ffi::c_void;
pub type IOpcSignatureReference = *mut ::core::ffi::c_void;
pub type IOpcSignatureReferenceEnumerator = *mut ::core::ffi::c_void;
pub type IOpcSignatureReferenceSet = *mut ::core::ffi::c_void;
pub type IOpcSignatureRelationshipReference = *mut ::core::ffi::c_void;
pub type IOpcSignatureRelationshipReferenceEnumerator = *mut ::core::ffi::c_void;
pub type IOpcSignatureRelationshipReferenceSet = *mut ::core::ffi::c_void;
pub type IOpcSigningOptions = *mut ::core::ffi::c_void;
pub type IOpcUri = *mut ::core::ffi::c_void;
pub type OPC_CANONICALIZATION_METHOD = i32;
pub const OPC_CANONICALIZATION_NONE: OPC_CANONICALIZATION_METHOD = 0i32;
pub const OPC_CANONICALIZATION_C14N: OPC_CANONICALIZATION_METHOD = 1i32;
pub const OPC_CANONICALIZATION_C14N_WITH_COMMENTS: OPC_CANONICALIZATION_METHOD = 2i32;
pub type OPC_CERTIFICATE_EMBEDDING_OPTION = i32;
pub const OPC_CERTIFICATE_IN_CERTIFICATE_PART: OPC_CERTIFICATE_EMBEDDING_OPTION = 0i32;
pub const OPC_CERTIFICATE_IN_SIGNATURE_PART: OPC_CERTIFICATE_EMBEDDING_OPTION = 1i32;
pub const OPC_CERTIFICATE_NOT_EMBEDDED: OPC_CERTIFICATE_EMBEDDING_OPTION = 2i32;
pub type OPC_COMPRESSION_OPTIONS = i32;
pub const OPC_COMPRESSION_NONE: OPC_COMPRESSION_OPTIONS = -1i32;
pub const OPC_COMPRESSION_NORMAL: OPC_COMPRESSION_OPTIONS = 0i32;
pub const OPC_COMPRESSION_MAXIMUM: OPC_COMPRESSION_OPTIONS = 1i32;
pub const OPC_COMPRESSION_FAST: OPC_COMPRESSION_OPTIONS = 2i32;
pub const OPC_COMPRESSION_SUPERFAST: OPC_COMPRESSION_OPTIONS = 3i32;
pub const OPC_E_CONFLICTING_SETTINGS: ::windows_sys::core::HRESULT = -2142175212i32;
pub const OPC_E_COULD_NOT_RECOVER: ::windows_sys::core::HRESULT = -2142175154i32;
pub const OPC_E_DS_DEFAULT_DIGEST_METHOD_NOT_SET: ::windows_sys::core::HRESULT = -2142175161i32;
pub const OPC_E_DS_DIGEST_VALUE_ERROR: ::windows_sys::core::HRESULT = -2142175206i32;
pub const OPC_E_DS_DUPLICATE_PACKAGE_OBJECT_REFERENCES: ::windows_sys::core::HRESULT = -2142175187i32;
pub const OPC_E_DS_DUPLICATE_SIGNATURE_ORIGIN_RELATIONSHIP: ::windows_sys::core::HRESULT = -2142175205i32;
pub const OPC_E_DS_DUPLICATE_SIGNATURE_PROPERTY_ELEMENT: ::windows_sys::core::HRESULT = -2142175192i32;
pub const OPC_E_DS_EXTERNAL_SIGNATURE: ::windows_sys::core::HRESULT = -2142175202i32;
pub const OPC_E_DS_EXTERNAL_SIGNATURE_REFERENCE: ::windows_sys::core::HRESULT = -2142175185i32;
pub const OPC_E_DS_INVALID_CANONICALIZATION_METHOD: ::windows_sys::core::HRESULT = -2142175198i32;
pub const OPC_E_DS_INVALID_CERTIFICATE_RELATIONSHIP: ::windows_sys::core::HRESULT = -2142175203i32;
pub const OPC_E_DS_INVALID_OPC_SIGNATURE_TIME_FORMAT: ::windows_sys::core::HRESULT = -2142175196i32;
pub const OPC_E_DS_INVALID_RELATIONSHIPS_SIGNING_OPTION: ::windows_sys::core::HRESULT = -2142175197i32;
pub const OPC_E_DS_INVALID_RELATIONSHIP_TRANSFORM_XML: ::windows_sys::core::HRESULT = -2142175199i32;
pub const OPC_E_DS_INVALID_SIGNATURE_COUNT: ::windows_sys::core::HRESULT = -2142175189i32;
pub const OPC_E_DS_INVALID_SIGNATURE_ORIGIN_RELATIONSHIP: ::windows_sys::core::HRESULT = -2142175204i32;
pub const OPC_E_DS_INVALID_SIGNATURE_XML: ::windows_sys::core::HRESULT = -2142175190i32;
pub const OPC_E_DS_MISSING_CANONICALIZATION_TRANSFORM: ::windows_sys::core::HRESULT = -2142175182i32;
pub const OPC_E_DS_MISSING_CERTIFICATE_PART: ::windows_sys::core::HRESULT = -2142175146i32;
pub const OPC_E_DS_MISSING_PACKAGE_OBJECT_REFERENCE: ::windows_sys::core::HRESULT = -2142175186i32;
pub const OPC_E_DS_MISSING_SIGNATURE_ALGORITHM: ::windows_sys::core::HRESULT = -2142175188i32;
pub const OPC_E_DS_MISSING_SIGNATURE_ORIGIN_PART: ::windows_sys::core::HRESULT = -2142175201i32;
pub const OPC_E_DS_MISSING_SIGNATURE_PART: ::windows_sys::core::HRESULT = -2142175200i32;
pub const OPC_E_DS_MISSING_SIGNATURE_PROPERTIES_ELEMENT: ::windows_sys::core::HRESULT = -2142175194i32;
pub const OPC_E_DS_MISSING_SIGNATURE_PROPERTY_ELEMENT: ::windows_sys::core::HRESULT = -2142175193i32;
pub const OPC_E_DS_MISSING_SIGNATURE_TIME_PROPERTY: ::windows_sys::core::HRESULT = -2142175191i32;
pub const OPC_E_DS_MULTIPLE_RELATIONSHIP_TRANSFORMS: ::windows_sys::core::HRESULT = -2142175183i32;
pub const OPC_E_DS_PACKAGE_REFERENCE_URI_RESERVED: ::windows_sys::core::HRESULT = -2142175195i32;
pub const OPC_E_DS_REFERENCE_MISSING_CONTENT_TYPE: ::windows_sys::core::HRESULT = -2142175184i32;
pub const OPC_E_DS_SIGNATURE_CORRUPT: ::windows_sys::core::HRESULT = -2142175207i32;
pub const OPC_E_DS_SIGNATURE_METHOD_NOT_SET: ::windows_sys::core::HRESULT = -2142175162i32;
pub const OPC_E_DS_SIGNATURE_ORIGIN_EXISTS: ::windows_sys::core::HRESULT = -2142175148i32;
pub const OPC_E_DS_SIGNATURE_PROPERTY_MISSING_TARGET: ::windows_sys::core::HRESULT = -2142175163i32;
pub const OPC_E_DS_SIGNATURE_REFERENCE_MISSING_URI: ::windows_sys::core::HRESULT = -2142175165i32;
pub const OPC_E_DS_UNSIGNED_PACKAGE: ::windows_sys::core::HRESULT = -2142175147i32;
pub const OPC_E_DUPLICATE_DEFAULT_EXTENSION: ::windows_sys::core::HRESULT = -2142175217i32;
pub const OPC_E_DUPLICATE_OVERRIDE_PART: ::windows_sys::core::HRESULT = -2142175219i32;
pub const OPC_E_DUPLICATE_PART: ::windows_sys::core::HRESULT = -2142175221i32;
pub const OPC_E_DUPLICATE_PIECE: ::windows_sys::core::HRESULT = -2142175211i32;
pub const OPC_E_DUPLICATE_RELATIONSHIP: ::windows_sys::core::HRESULT = -2142175213i32;
pub const OPC_E_ENUM_CANNOT_MOVE_NEXT: ::windows_sys::core::HRESULT = -2142175151i32;
pub const OPC_E_ENUM_CANNOT_MOVE_PREVIOUS: ::windows_sys::core::HRESULT = -2142175150i32;
pub const OPC_E_ENUM_COLLECTION_CHANGED: ::windows_sys::core::HRESULT = -2142175152i32;
pub const OPC_E_ENUM_INVALID_POSITION: ::windows_sys::core::HRESULT = -2142175149i32;
pub const OPC_E_INVALID_CONTENT_TYPE: ::windows_sys::core::HRESULT = -2142175164i32;
pub const OPC_E_INVALID_CONTENT_TYPE_XML: ::windows_sys::core::HRESULT = -2142175226i32;
pub const OPC_E_INVALID_DEFAULT_EXTENSION: ::windows_sys::core::HRESULT = -2142175218i32;
pub const OPC_E_INVALID_OVERRIDE_PART_NAME: ::windows_sys::core::HRESULT = -2142175220i32;
pub const OPC_E_INVALID_PIECE: ::windows_sys::core::HRESULT = -2142175210i32;
pub const OPC_E_INVALID_RELATIONSHIP_ID: ::windows_sys::core::HRESULT = -2142175216i32;
pub const OPC_E_INVALID_RELATIONSHIP_TARGET: ::windows_sys::core::HRESULT = -2142175214i32;
pub const OPC_E_INVALID_RELATIONSHIP_TARGET_MODE: ::windows_sys::core::HRESULT = -2142175155i32;
pub const OPC_E_INVALID_RELATIONSHIP_TYPE: ::windows_sys::core::HRESULT = -2142175215i32;
pub const OPC_E_INVALID_RELS_XML: ::windows_sys::core::HRESULT = -2142175222i32;
pub const OPC_E_INVALID_XML_ENCODING: ::windows_sys::core::HRESULT = -2142175166i32;
pub const OPC_E_MC_INCONSISTENT_PRESERVE_ATTRIBUTES: ::windows_sys::core::HRESULT = -2142175157i32;
pub const OPC_E_MC_INCONSISTENT_PRESERVE_ELEMENTS: ::windows_sys::core::HRESULT = -2142175156i32;
pub const OPC_E_MC_INCONSISTENT_PROCESS_CONTENT: ::windows_sys::core::HRESULT = -2142175158i32;
pub const OPC_E_MC_INVALID_ATTRIBUTES_ON_IGNORABLE_ELEMENT: ::windows_sys::core::HRESULT = -2142175168i32;
pub const OPC_E_MC_INVALID_ENUM_TYPE: ::windows_sys::core::HRESULT = -2142175172i32;
pub const OPC_E_MC_INVALID_PREFIX_LIST: ::windows_sys::core::HRESULT = -2142175177i32;
pub const OPC_E_MC_INVALID_QNAME_LIST: ::windows_sys::core::HRESULT = -2142175176i32;
pub const OPC_E_MC_INVALID_XMLNS_ATTRIBUTE: ::windows_sys::core::HRESULT = -2142175167i32;
pub const OPC_E_MC_MISSING_CHOICE: ::windows_sys::core::HRESULT = -2142175173i32;
pub const OPC_E_MC_MISSING_REQUIRES_ATTR: ::windows_sys::core::HRESULT = -2142175179i32;
pub const OPC_E_MC_MULTIPLE_FALLBACK_ELEMENTS: ::windows_sys::core::HRESULT = -2142175159i32;
pub const OPC_E_MC_NESTED_ALTERNATE_CONTENT: ::windows_sys::core::HRESULT = -2142175175i32;
pub const OPC_E_MC_UNEXPECTED_ATTR: ::windows_sys::core::HRESULT = -2142175178i32;
pub const OPC_E_MC_UNEXPECTED_CHOICE: ::windows_sys::core::HRESULT = -2142175174i32;
pub const OPC_E_MC_UNEXPECTED_ELEMENT: ::windows_sys::core::HRESULT = -2142175181i32;
pub const OPC_E_MC_UNEXPECTED_REQUIRES_ATTR: ::windows_sys::core::HRESULT = -2142175180i32;
pub const OPC_E_MC_UNKNOWN_NAMESPACE: ::windows_sys::core::HRESULT = -2142175170i32;
pub const OPC_E_MC_UNKNOWN_PREFIX: ::windows_sys::core::HRESULT = -2142175169i32;
pub const OPC_E_MISSING_CONTENT_TYPES: ::windows_sys::core::HRESULT = -2142175225i32;
pub const OPC_E_MISSING_PIECE: ::windows_sys::core::HRESULT = -2142175209i32;
pub const OPC_E_NONCONFORMING_CONTENT_TYPES_XML: ::windows_sys::core::HRESULT = -2142175224i32;
pub const OPC_E_NONCONFORMING_RELS_XML: ::windows_sys::core::HRESULT = -2142175223i32;
pub const OPC_E_NONCONFORMING_URI: ::windows_sys::core::HRESULT = -2142175231i32;
pub const OPC_E_NO_SUCH_PART: ::windows_sys::core::HRESULT = -2142175208i32;
pub const OPC_E_NO_SUCH_RELATIONSHIP: ::windows_sys::core::HRESULT = -2142175160i32;
pub const OPC_E_NO_SUCH_SETTINGS: ::windows_sys::core::HRESULT = -2142175145i32;
pub const OPC_E_PART_CANNOT_BE_DIRECTORY: ::windows_sys::core::HRESULT = -2142175228i32;
pub const OPC_E_RELATIONSHIP_URI_REQUIRED: ::windows_sys::core::HRESULT = -2142175229i32;
pub const OPC_E_RELATIVE_URI_REQUIRED: ::windows_sys::core::HRESULT = -2142175230i32;
pub const OPC_E_UNEXPECTED_CONTENT_TYPE: ::windows_sys::core::HRESULT = -2142175227i32;
pub const OPC_E_UNSUPPORTED_PACKAGE: ::windows_sys::core::HRESULT = -2142175153i32;
pub const OPC_E_ZIP_CENTRAL_DIRECTORY_TOO_LARGE: ::windows_sys::core::HRESULT = -2142171127i32;
pub const OPC_E_ZIP_COMMENT_TOO_LARGE: ::windows_sys::core::HRESULT = -2142171124i32;
pub const OPC_E_ZIP_COMPRESSION_FAILED: ::windows_sys::core::HRESULT = -2142171133i32;
pub const OPC_E_ZIP_CORRUPTED_ARCHIVE: ::windows_sys::core::HRESULT = -2142171134i32;
pub const OPC_E_ZIP_DECOMPRESSION_FAILED: ::windows_sys::core::HRESULT = -2142171132i32;
pub const OPC_E_ZIP_DUPLICATE_NAME: ::windows_sys::core::HRESULT = -2142171125i32;
pub const OPC_E_ZIP_EXTRA_FIELDS_TOO_LARGE: ::windows_sys::core::HRESULT = -2142171123i32;
pub const OPC_E_ZIP_FILE_HEADER_TOO_LARGE: ::windows_sys::core::HRESULT = -2142171122i32;
pub const OPC_E_ZIP_INCONSISTENT_DIRECTORY: ::windows_sys::core::HRESULT = -2142171130i32;
pub const OPC_E_ZIP_INCONSISTENT_FILEITEM: ::windows_sys::core::HRESULT = -2142171131i32;
pub const OPC_E_ZIP_INCORRECT_DATA_SIZE: ::windows_sys::core::HRESULT = -2142171135i32;
pub const OPC_E_ZIP_MISSING_DATA_DESCRIPTOR: ::windows_sys::core::HRESULT = -2142171129i32;
pub const OPC_E_ZIP_MISSING_END_OF_CENTRAL_DIRECTORY: ::windows_sys::core::HRESULT = -2142171121i32;
pub const OPC_E_ZIP_NAME_TOO_LARGE: ::windows_sys::core::HRESULT = -2142171126i32;
pub const OPC_E_ZIP_REQUIRES_64_BIT: ::windows_sys::core::HRESULT = -2142171120i32;
pub const OPC_E_ZIP_UNSUPPORTEDARCHIVE: ::windows_sys::core::HRESULT = -2142171128i32;
pub type OPC_READ_FLAGS = u32;
pub const OPC_READ_DEFAULT: OPC_READ_FLAGS = 0u32;
pub const OPC_VALIDATE_ON_LOAD: OPC_READ_FLAGS = 1u32;
pub const OPC_CACHE_ON_ACCESS: OPC_READ_FLAGS = 2u32;
pub type OPC_RELATIONSHIPS_SIGNING_OPTION = i32;
pub const OPC_RELATIONSHIP_SIGN_USING_SELECTORS: OPC_RELATIONSHIPS_SIGNING_OPTION = 0i32;
pub const OPC_RELATIONSHIP_SIGN_PART: OPC_RELATIONSHIPS_SIGNING_OPTION = 1i32;
pub type OPC_RELATIONSHIP_SELECTOR = i32;
pub const OPC_RELATIONSHIP_SELECT_BY_ID: OPC_RELATIONSHIP_SELECTOR = 0i32;
pub const OPC_RELATIONSHIP_SELECT_BY_TYPE: OPC_RELATIONSHIP_SELECTOR = 1i32;
pub type OPC_SIGNATURE_TIME_FORMAT = i32;
pub const OPC_SIGNATURE_TIME_FORMAT_MILLISECONDS: OPC_SIGNATURE_TIME_FORMAT = 0i32;
pub const OPC_SIGNATURE_TIME_FORMAT_SECONDS: OPC_SIGNATURE_TIME_FORMAT = 1i32;
pub const OPC_SIGNATURE_TIME_FORMAT_MINUTES: OPC_SIGNATURE_TIME_FORMAT = 2i32;
pub const OPC_SIGNATURE_TIME_FORMAT_DAYS: OPC_SIGNATURE_TIME_FORMAT = 3i32;
pub const OPC_SIGNATURE_TIME_FORMAT_MONTHS: OPC_SIGNATURE_TIME_FORMAT = 4i32;
pub const OPC_SIGNATURE_TIME_FORMAT_YEARS: OPC_SIGNATURE_TIME_FORMAT = 5i32;
pub type OPC_SIGNATURE_VALIDATION_RESULT = i32;
pub const OPC_SIGNATURE_VALID: OPC_SIGNATURE_VALIDATION_RESULT = 0i32;
pub const OPC_SIGNATURE_INVALID: OPC_SIGNATURE_VALIDATION_RESULT = -1i32;
pub type OPC_STREAM_IO_MODE = i32;
pub const OPC_STREAM_IO_READ: OPC_STREAM_IO_MODE = 1i32;
pub const OPC_STREAM_IO_WRITE: OPC_STREAM_IO_MODE = 2i32;
pub type OPC_URI_TARGET_MODE = i32;
pub const OPC_URI_TARGET_MODE_INTERNAL: OPC_URI_TARGET_MODE = 0i32;
pub const OPC_URI_TARGET_MODE_EXTERNAL: OPC_URI_TARGET_MODE = 1i32;
pub type OPC_WRITE_FLAGS = u32;
pub const OPC_WRITE_DEFAULT: OPC_WRITE_FLAGS = 0u32;
pub const OPC_WRITE_FORCE_ZIP32: OPC_WRITE_FLAGS = 1u32;
pub const OpcFactory: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1798138784, data2: 40766, data3: 20263, data4: [146, 11, 49, 60, 196, 38, 163, 158] };
|
//! Error types produced when manipulating a storage resource.
use openssl::error::ErrorStack;
use uuid::Uuid;
use std::error::Error;
use std::fmt;
use std::io;
/// The main error type.
#[derive(Debug)]
pub enum StorageError {
/// An error originating in the standard library's IO module.
StdIo(io::Error),
/// No containers were able to accept a new file.
NoAvailableContainers,
/// A client tried to access a container with the give UUID, but it doesn't exist.
MissingContainer(Uuid),
/// A client tried to access a data location and the container was found, but the ID did
/// not exist within it. The parameter is the ID of the missing element.
MissingElement(Uuid),
/// An OpenSSL error occurred during encryption or decryption.
OpenSsl(ErrorStack),
/// An operation was attempted on a path that contained invalid Unicode.
InvalidUnicode,
}
impl fmt::Display for StorageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use StorageError::*;
match *self {
StdIo(ref error) => write!(f, "I/O error: {}", error),
NoAvailableContainers => write!(f, "{}", self.description()),
MissingContainer(ref uuid) => write!(f, "Missing container: {}", uuid.to_hyphenated()),
MissingElement(ref uuid) => write!(f, "Missing element: {}", uuid.to_hyphenated()),
OpenSsl(ref error) => write!(f, "OpenSSL error: {}", error),
InvalidUnicode => write!(f, "{}", self.description()),
}
}
}
impl Error for StorageError {
fn description(&self) -> &str {
use StorageError::*;
match *self {
StdIo(ref error) => error.description(),
NoAvailableContainers => "no containers were able to accept the new data",
MissingContainer(_) => "tried to access a container which does not exist",
MissingElement(_) => "tried to access an element which does not exist",
OpenSsl(ref error) => error.description(),
InvalidUnicode => "tried to use a file/folder whose path contained invalid Unicode"
}
}
fn cause(&self) -> Option<&Error> {
use StorageError::*;
match *self {
StdIo(ref error) => Some(error),
OpenSsl(ref error) => Some(error),
_ => None,
}
}
}
impl From<io::Error> for StorageError {
fn from(e: io::Error) -> Self {
StorageError::StdIo(e)
}
}
impl From<ErrorStack> for StorageError {
fn from(e: ErrorStack) -> Self {
StorageError::OpenSsl(e)
}
}
impl From<StorageError> for io::Error {
fn from(e: StorageError) -> Self {
Self::new(io::ErrorKind::Other, e)
}
}
|
// 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::net::SocketAddr;
use std::str::FromStr;
use std::sync::Arc;
use common_arrow::arrow_format::flight::data::Empty;
use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient;
use common_base::base::tokio;
use common_base::base::tokio::net::TcpListener;
use common_exception::ErrorCode;
use common_exception::Result;
use common_grpc::ConnectionFactory;
use common_grpc::GrpcConnectionError;
use common_grpc::RpcClientTlsConfig;
use databend_query::api::RpcService;
use tokio_stream::wrappers::TcpListenerStream;
use crate::tests::tls_constants::TEST_CA_CERT;
use crate::tests::tls_constants::TEST_CN_NAME;
use crate::tests::tls_constants::TEST_SERVER_CERT;
use crate::tests::tls_constants::TEST_SERVER_KEY;
use crate::tests::ConfigBuilder;
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn test_tls_rpc_server() -> Result<()> {
let mut rpc_service = RpcService::create(
ConfigBuilder::create()
.rpc_tls_server_key(TEST_SERVER_KEY)
.rpc_tls_server_cert(TEST_SERVER_CERT)
.build(),
)?;
let mut listener_address = SocketAddr::from_str("127.0.0.1:0")?;
listener_address = rpc_service.start(listener_address).await?;
let tls_conf = Some(RpcClientTlsConfig {
rpc_tls_server_root_ca_cert: TEST_CA_CERT.to_string(),
domain_name: TEST_CN_NAME.to_string(),
});
// normal case
let conn = ConnectionFactory::create_rpc_channel(listener_address, None, tls_conf).await?;
let mut f_client = FlightServiceClient::new(conn);
let r = f_client.list_actions(Empty {}).await;
assert!(r.is_ok());
// client access without tls enabled will be failed
// - channel can still be created, but communication will be failed
let channel = ConnectionFactory::create_rpc_channel(listener_address, None, None).await?;
let mut f_client = FlightServiceClient::new(channel);
let r = f_client.list_actions(Empty {}).await;
assert!(r.is_err());
Ok(())
}
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn test_tls_rpc_server_invalid_server_config() -> Result<()> {
// setup, invalid cert locations
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
let mut srv = RpcService {
config: ConfigBuilder::create()
.rpc_tls_server_key("../tests/data/certs/none.key")
.rpc_tls_server_cert("../tests/data/certs/none.pem")
.build(),
abort_notify: Arc::new(Default::default()),
};
let stream = TcpListenerStream::new(listener);
let r = srv.start_with_incoming(stream).await;
assert!(r.is_err());
let e = r.unwrap_err();
assert_eq!(e.code(), ErrorCode::TLSConfigurationFailure("").code());
Ok(())
}
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn test_tls_rpc_server_invalid_client_config() -> Result<()> {
// setup, invalid cert locations
let client_conf = RpcClientTlsConfig {
rpc_tls_server_root_ca_cert: "../tests/data/certs/nowhere.pem".to_string(),
domain_name: TEST_CN_NAME.to_string(),
};
let r = ConnectionFactory::create_rpc_channel("fake:1234", None, Some(client_conf)).await;
assert!(r.is_err());
let e = r.unwrap_err();
match e {
GrpcConnectionError::TLSConfigError { action, .. } => {
assert_eq!("loading", action);
}
_ => unimplemented!("expect TLSConfigError"),
}
Ok(())
}
|
use crate::math::{Color, Point};
use super::{Texture, utils::Perlin};
pub struct PerlinTexture {
noise: Perlin,
scale: f64,
}
impl PerlinTexture {
pub fn new() -> Self {
let noise: Perlin = Default::default();
PerlinTexture {
noise,
scale: 1.0
}
}
pub fn new_with_scale(scale: f64) -> Self {
let noise: Perlin = Default::default();
PerlinTexture {
noise,
scale
}
}
}
impl Texture for PerlinTexture {
fn value(&self, _u: f64, _v: f64, p: Point) -> Color {
Color::ONE * 0.5 * (1.0 + (self.scale * p.z + 10.0 * self.noise.turb(self.scale * p, 7)).sin())
}
}
impl Default for PerlinTexture {
fn default() -> Self {
PerlinTexture::new()
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.