Struct win_wrap::msaa::object::AccessibleObject

source ·
pub struct AccessibleObject(/* private fields */);

Implementations§

source§

impl AccessibleObject

source

pub fn get_raw(&self) -> &IAccessible

source

pub fn get_child_id(&self) -> i32

source

pub fn from_window(h_wnd: HWND) -> Result<Self>

从窗口获取对象。 h_wnd 窗口句柄。

source

pub fn from_caret() -> Result<Self>

从插入点获取对象。

source

pub fn from_point(x: i32, y: i32) -> Result<(Self, i32)>

从屏幕坐标获取对象。 x 横坐标。 y 纵坐标。

source

pub fn from_event(h_wnd: HWND, id: i32, child_id: i32) -> Result<(Self, i32)>

从事件获取对象。 h_wnd 指定生成事件的窗口的窗口句柄。此值必须是发送到事件挂钩函数的窗口句柄。 id 指定生成事件的 对象的对象 ID。 此值必须是发送到事件挂钩函数的对象 ID。 child_id 指定事件是由对象还是由其子元素之一触发。如果对象触发了事件,则 child_id = CHILDID_SELF。如果子元素触发了事件, 则 child_id 是元素的子 ID。此值必须是发送到事件挂钩函数的子 ID。

source

pub fn get_name(&self, child: i32) -> String

获取对象名称。 child 子对象ID,0是对象本身。

source

pub fn get_description(&self, child: i32) -> String

获取对象描述。 child 子对象ID,0是对象本身。

source

pub fn get_help(&self, child: i32) -> String

获取对象帮助。 child 子对象ID,0是对象本身。

source

pub fn get_help_topic(&self, child: i32) -> (String, i32)

查询与指定对象关联的 WinHelp 文件的完整路径;它还检索该文件中相应主题的标识符。并非所有对象都支持此属性。应用程序很少支持或使用此属性。(已经弃用) child 子对象ID,0是对象本身。

source

pub fn get_keyboard_shortcut(&self, child: i32) -> String

获取对象快捷键。 child 子对象ID,0是对象本身。

source

pub fn get_value(&self, child: i32) -> String

获取对象值。 child 子对象ID,0是对象本身。

source

pub fn get_default_action(&self, child: i32) -> String

获取对象默认动作。 child 子对象ID,0是对象本身。

source

pub fn get_role(&self, child: i32) -> u32

获取对象角色。 child 子对象ID,0是对象本身。

source

pub fn get_role_text(&self, child: i32) -> String

查询描述指定角色值的对象角色的本地化字符串。 child 子对象ID,0是对象本身。

source

pub fn get_state_text(&self, child: i32) -> String

查询描述单个预定义状态位标志的对象状态的本地化字符串。 由于状态值是一个或多个位标志的组合,因此客户端多次调用此函数以检索所有状态字符串。 child 子对象ID,0是对象本身。

source

pub fn get_state(&self, child: i32) -> u32

获取对象状态。 child 子对象ID,0是对象本身。

source

pub fn do_default_action(&self, child: i32)

执行默认动作。 child 子对象ID,0是对象本身。

source

pub fn select(&self, flags: i32, child: i32)

修改所选内容或移动指定对象的键盘焦点。 flags 指定要执行哪些选择或焦点操作。此参数必须具有 SELFLAG 常量的组合。 child 子对象ID,0是对象本身。

source

pub fn navigate(&self, nav_dir: i32, start: i32) -> Option<Self>

遍历到容器中的另一个 UI 元素并查询对象。(已经弃用) nav_dir 指定导航方向。此方向按空间顺序(如左或右)或逻辑顺序(例如下一个或上一个)。此值是导航常量之一。 start 起始子对象ID,0是对象本身。

source

pub fn hit_test(&self, left: i32, top: i32) -> Option<Self>

查询在屏幕上特定点显示的子元素或子对象。 left 指定命中测试点的屏幕坐标。x 坐标从左到右增加。请注意,使用屏幕坐标时,原点是屏幕的左上角。 top 指定命中测试点的屏幕坐标。y 坐标从上到下增加。请注意,使用屏幕坐标时,原点是屏幕的左上角。

source

pub fn focus(&self) -> Option<Self>

获取焦点对象。

source

pub fn selection(&self) -> Option<Self>

获取选中对象。

source

pub fn parent(&self) -> Option<Self>

获取父对象。

source

pub fn child_count(&self) -> u32

获取子对象数量。

source

pub fn get_child(&self, child: i32) -> Result<Self>

获取子对象。 child 子对象ID,0是对象本身。

source

pub fn children(&self, start: u32, count: u32) -> Result<Vec<Self>>

获取所有子对象。

source

pub fn location(&self, child: i32) -> (i32, i32, i32, i32)

获取对象位置和大小。 child 子对象ID,0是对象本身。

source

pub fn put_name(&self, child: i32, name: String)

不再支持 put_accName 方法。客户端应用程序应使用特定于控件的解决方法,例如SetWindowText 函数。服务器应返回E_NOTIMPL。

source

pub fn put_value(&self, child: i32, value: String)

设置指定对象的值。并非所有对象都有值。 child 子对象ID,0是对象本身。 value 包含对象的值的本地化字符串。

source

pub fn window(&self) -> HWND

获取窗口句柄。

Trait Implementations§

source§

impl Clone for AccessibleObject

source§

fn clone(&self) -> AccessibleObject

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessibleObject

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AccessibleObject

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Send for AccessibleObject

source§

impl Sync for AccessibleObject

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.