use windows::Win32::UI::Accessibility::WindowInteractionState;
use windows::Win32::UI::Accessibility::ZoomUnit;
use crate::Result;
use crate::UIElement;
use crate::variants::Variant;
pub trait Invoke {
fn invoke(&self) -> Result<()>;
}
pub trait SelectionItem {
fn select(&self) -> Result<()>;
fn add_to_selection(&self) -> Result<()>;
fn remove_from_selection(&self) -> Result<()>;
fn is_selected(&self) -> Result<bool>;
}
pub trait MultipleView {
fn get_supported_views(&self) -> Result<Vec<i32>>;
fn get_view_name(&self, view: i32) -> Result<String>;
fn get_current_view(&self) -> Result<i32>;
fn set_current_view(&self, view: i32) -> Result<()>;
}
pub trait ItemContainer {
fn find_item_by_property(&self, start_after: UIElement, property_id: i32, value: Variant) -> Result<UIElement>;
}
pub trait ScrollItem {
fn scroll_into_view(&self) -> Result<()>;
}
pub trait Window {
fn close(&self) -> Result<()>;
fn wait_for_input_idle(&self, milliseconds: i32) -> Result<bool>;
fn is_normal(&self) -> Result<bool>;
fn normal(&self) -> Result<()>;
fn can_maximize(&self) -> Result<bool>;
fn is_maximized(&self) -> Result<bool>;
fn maximize(&self) -> Result<()>;
fn can_minimize(&self) -> Result<bool>;
fn is_minimized(&self) -> Result<bool>;
fn minimize(&self) -> Result<()>;
fn is_modal(&self) -> Result<bool>;
fn is_topmost(&self) -> Result<bool>;
fn get_window_interaction_state(&self) -> Result<WindowInteractionState>;
}
pub trait Transform {
fn can_move(&self) -> Result<bool>;
fn move_to(&self, x: f64, y: f64) -> Result<()>;
fn can_resize(&self) -> Result<bool>;
fn resize(&self, width: f64, height: f64) -> Result<()>;
fn can_rotate(&self) -> Result<bool>;
fn rotate(&self, degrees: f64) -> Result<()>;
fn can_zoom(&self) -> Result<bool>;
fn get_zoom_level(&self) -> Result<f64>;
fn get_zoom_minimum(&self) -> Result<f64>;
fn get_zoom_maximum(&self) -> Result<f64>;
fn zoom(&self, zoom_value: f64) -> Result<()>;
fn zoom_by_unit(&self, zoom_unit: ZoomUnit) -> Result<()>;
}
pub trait Value {
fn set_value(&self, value: &str) -> Result<()>;
fn get_value(&self) -> Result<String>;
fn is_readonly(&self) -> Result<bool>;
}