#![allow(clippy::too_many_arguments)]
use crate::atspi_proxy;
use crate::common::{ClipType, CoordType, Granularity};
#[atspi_proxy(interface = "org.a11y.atspi.Text", assume_defaults = true)]
trait Text {
fn add_selection(&self, start_offset: i32, end_offset: i32) -> zbus::Result<bool>;
fn get_attribute_run(
&self,
offset: i32,
include_defaults: bool,
) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>;
fn get_attribute_value(&self, offset: i32, attribute_name: &str) -> zbus::Result<String>;
fn get_attributes(
&self,
offset: i32,
) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>;
fn get_bounded_ranges(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
coord_type: CoordType,
x_clip_type: ClipType,
y_clip_type: ClipType,
) -> zbus::Result<Vec<(i32, i32, String, zbus::zvariant::OwnedValue)>>;
fn get_character_at_offset(&self, offset: i32) -> zbus::Result<i32>;
fn get_character_extents(
&self,
offset: i32,
coord_type: CoordType,
) -> zbus::Result<(i32, i32, i32, i32)>;
fn get_default_attribute_set(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
fn get_default_attributes(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
fn get_nselections(&self) -> zbus::Result<i32>;
fn get_offset_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<i32>;
fn get_range_extents(
&self,
start_offset: i32,
end_offset: i32,
coord_type: CoordType,
) -> zbus::Result<(i32, i32, i32, i32)>;
fn get_selection(&self, selection_num: i32) -> zbus::Result<(i32, i32)>;
fn get_string_at_offset(
&self,
offset: i32,
granularity: Granularity,
) -> zbus::Result<(String, i32, i32)>;
fn get_text(&self, start_offset: i32, end_offset: i32) -> zbus::Result<String>;
fn get_text_after_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
fn get_text_at_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
fn get_text_before_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
fn remove_selection(&self, selection_num: i32) -> zbus::Result<bool>;
fn scroll_substring_to(
&self,
start_offset: i32,
end_offset: i32,
type_: u32,
) -> zbus::Result<bool>;
fn scroll_substring_to_point(
&self,
start_offset: i32,
end_offset: i32,
type_: u32,
x: i32,
y: i32,
) -> zbus::Result<bool>;
fn set_caret_offset(&self, offset: i32) -> zbus::Result<bool>;
fn set_selection(
&self,
selection_num: i32,
start_offset: i32,
end_offset: i32,
) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn caret_offset(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn character_count(&self) -> zbus::Result<i32>;
}