Struct win_wrap::msaa::object::AccessibleObject
source · pub struct AccessibleObject(/* private fields */);Implementations§
source§impl AccessibleObject
impl AccessibleObject
pub fn get_raw(&self) -> &IAccessible
pub fn get_child_id(&self) -> i32
sourcepub fn from_window(h_wnd: HWND) -> Result<Self>
pub fn from_window(h_wnd: HWND) -> Result<Self>
从窗口获取对象。
h_wnd 窗口句柄。
sourcepub fn from_caret() -> Result<Self>
pub fn from_caret() -> Result<Self>
从插入点获取对象。
sourcepub fn from_event(h_wnd: HWND, id: i32, child_id: i32) -> Result<(Self, i32)>
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。
sourcepub fn get_description(&self, child: i32) -> String
pub fn get_description(&self, child: i32) -> String
获取对象描述。
child 子对象ID,0是对象本身。
sourcepub fn get_help_topic(&self, child: i32) -> (String, i32)
pub fn get_help_topic(&self, child: i32) -> (String, i32)
查询与指定对象关联的 WinHelp 文件的完整路径;它还检索该文件中相应主题的标识符。并非所有对象都支持此属性。应用程序很少支持或使用此属性。(已经弃用)
child 子对象ID,0是对象本身。
sourcepub fn get_keyboard_shortcut(&self, child: i32) -> String
pub fn get_keyboard_shortcut(&self, child: i32) -> String
获取对象快捷键。
child 子对象ID,0是对象本身。
sourcepub fn get_default_action(&self, child: i32) -> String
pub fn get_default_action(&self, child: i32) -> String
获取对象默认动作。
child 子对象ID,0是对象本身。
sourcepub fn get_role_text(&self, child: i32) -> String
pub fn get_role_text(&self, child: i32) -> String
查询描述指定角色值的对象角色的本地化字符串。
child 子对象ID,0是对象本身。
sourcepub fn get_state_text(&self, child: i32) -> String
pub fn get_state_text(&self, child: i32) -> String
查询描述单个预定义状态位标志的对象状态的本地化字符串。 由于状态值是一个或多个位标志的组合,因此客户端多次调用此函数以检索所有状态字符串。
child 子对象ID,0是对象本身。
sourcepub fn do_default_action(&self, child: i32)
pub fn do_default_action(&self, child: i32)
执行默认动作。
child 子对象ID,0是对象本身。
sourcepub fn select(&self, flags: i32, child: i32)
pub fn select(&self, flags: i32, child: i32)
修改所选内容或移动指定对象的键盘焦点。
flags 指定要执行哪些选择或焦点操作。此参数必须具有 SELFLAG 常量的组合。
child 子对象ID,0是对象本身。
遍历到容器中的另一个 UI 元素并查询对象。(已经弃用)
nav_dir 指定导航方向。此方向按空间顺序(如左或右)或逻辑顺序(例如下一个或上一个)。此值是导航常量之一。
start 起始子对象ID,0是对象本身。
sourcepub fn hit_test(&self, left: i32, top: i32) -> Option<Self>
pub fn hit_test(&self, left: i32, top: i32) -> Option<Self>
查询在屏幕上特定点显示的子元素或子对象。
left 指定命中测试点的屏幕坐标。x 坐标从左到右增加。请注意,使用屏幕坐标时,原点是屏幕的左上角。
top 指定命中测试点的屏幕坐标。y 坐标从上到下增加。请注意,使用屏幕坐标时,原点是屏幕的左上角。
sourcepub fn child_count(&self) -> u32
pub fn child_count(&self) -> u32
获取子对象数量。
sourcepub fn put_name(&self, child: i32, name: String)
pub fn put_name(&self, child: i32, name: String)
不再支持 put_accName 方法。客户端应用程序应使用特定于控件的解决方法,例如SetWindowText 函数。服务器应返回E_NOTIMPL。
Trait Implementations§
source§impl Clone for AccessibleObject
impl Clone for AccessibleObject
source§fn clone(&self) -> AccessibleObject
fn clone(&self) -> AccessibleObject
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AccessibleObject
impl Debug for AccessibleObject
source§impl Display for AccessibleObject
impl Display for AccessibleObject
impl Send for AccessibleObject
impl Sync for AccessibleObject
Auto Trait Implementations§
impl Freeze for AccessibleObject
impl RefUnwindSafe for AccessibleObject
impl Unpin for AccessibleObject
impl UnwindSafe for AccessibleObject
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)