(&self, property_id: UIA_PROPERTY_ID)
| 1007 | } |
| 1008 | |
| 1009 | fn GetPropertyValue(&self, property_id: UIA_PROPERTY_ID) -> Result<VARIANT> { |
| 1010 | self.resolve_with_tree_state_and_context(|node, state, context| { |
| 1011 | let wrapper = NodeWrapper(&node); |
| 1012 | let mut result = wrapper.get_property_value(property_id); |
| 1013 | if result.is_empty() { |
| 1014 | if node.is_root() { |
| 1015 | match property_id { |
| 1016 | UIA_NamePropertyId => { |
| 1017 | result = window_title(context.hwnd).into(); |
| 1018 | } |
| 1019 | UIA_NativeWindowHandlePropertyId => { |
| 1020 | result = (context.hwnd.0.0 as i32).into(); |
| 1021 | } |
| 1022 | _ => (), |
| 1023 | } |
| 1024 | } |
| 1025 | match property_id { |
| 1026 | UIA_FrameworkIdPropertyId => result = state.toolkit_name().into(), |
| 1027 | UIA_ProviderDescriptionPropertyId => result = toolkit_description(state).into(), |
| 1028 | UIA_ControllerForPropertyId => { |
| 1029 | let controlled: Vec<IUnknown> = node |
| 1030 | .controls() |
| 1031 | .filter(|controlled| filter(controlled) == FilterResult::Include) |
| 1032 | .map(|controlled| self.relative(controlled.id())) |
| 1033 | .map(IRawElementProviderSimple::from) |
| 1034 | .filter_map(|controlled| controlled.cast::<IUnknown>().ok()) |
| 1035 | .collect(); |
| 1036 | result = controlled.into(); |
| 1037 | } |
| 1038 | _ => (), |
| 1039 | } |
| 1040 | } |
| 1041 | Ok(result.into()) |
| 1042 | }) |
| 1043 | } |
| 1044 | |
| 1045 | fn HostRawElementProvider(&self) -> Result<IRawElementProviderSimple> { |
| 1046 | self.with_tree_state_and_context(|state, context| { |
nothing calls this directly
no test coverage detected