@@ -443,6 +443,18 @@ impl NodeWrapper<'_> {
443
443
self . 0 . role ( ) == Role :: PasswordInput
444
444
}
445
445
446
+ fn is_dialog ( & self ) -> bool {
447
+ self . 0 . is_dialog ( )
448
+ }
449
+
450
+ fn is_window_pattern_supported ( & self ) -> bool {
451
+ self . 0 . is_modal ( )
452
+ }
453
+
454
+ fn is_modal ( & self ) -> bool {
455
+ self . 0 . is_modal ( )
456
+ }
457
+
446
458
pub ( crate ) fn enqueue_property_changes (
447
459
& self ,
448
460
queue : & mut Vec < QueuedEvent > ,
@@ -500,7 +512,8 @@ impl NodeWrapper<'_> {
500
512
IRangeValueProvider ,
501
513
ISelectionItemProvider ,
502
514
ISelectionProvider ,
503
- ITextProvider
515
+ ITextProvider ,
516
+ IWindowProvider
504
517
) ]
505
518
pub ( crate ) struct PlatformNode {
506
519
pub ( crate ) context : Weak < Context > ,
@@ -925,7 +938,8 @@ properties! {
925
938
( UIA_IsRequiredForFormPropertyId , is_required) ,
926
939
( UIA_IsPasswordPropertyId , is_password) ,
927
940
( UIA_PositionInSetPropertyId , position_in_set) ,
928
- ( UIA_SizeOfSetPropertyId , size_of_set)
941
+ ( UIA_SizeOfSetPropertyId , size_of_set) ,
942
+ ( UIA_IsDialogPropertyId , is_dialog)
929
943
}
930
944
931
945
patterns ! {
@@ -1065,6 +1079,41 @@ patterns! {
1065
1079
}
1066
1080
} )
1067
1081
}
1082
+ ) ) ,
1083
+ ( UIA_WindowPatternId , IWindowProvider , IWindowProvider_Impl , is_window_pattern_supported, (
1084
+ ( UIA_WindowIsModalPropertyId , IsModal , is_modal, BOOL )
1085
+ ) , (
1086
+ fn SetVisualState ( & self , _: WindowVisualState ) -> Result <( ) > {
1087
+ Err ( not_supported( ) )
1088
+ } ,
1089
+
1090
+ fn Close ( & self ) -> Result <( ) > {
1091
+ Err ( not_supported( ) )
1092
+ } ,
1093
+
1094
+ fn WaitForInputIdle ( & self , _: i32 ) -> Result <BOOL > {
1095
+ Err ( not_supported( ) )
1096
+ } ,
1097
+
1098
+ fn CanMaximize ( & self ) -> Result <BOOL > {
1099
+ Err ( not_supported( ) )
1100
+ } ,
1101
+
1102
+ fn CanMinimize ( & self ) -> Result <BOOL > {
1103
+ Err ( not_supported( ) )
1104
+ } ,
1105
+
1106
+ fn WindowVisualState ( & self ) -> Result <WindowVisualState > {
1107
+ Err ( not_supported( ) )
1108
+ } ,
1109
+
1110
+ fn WindowInteractionState ( & self ) -> Result <WindowInteractionState > {
1111
+ Err ( not_supported( ) )
1112
+ } ,
1113
+
1114
+ fn IsTopmost ( & self ) -> Result <BOOL > {
1115
+ Err ( not_supported( ) )
1116
+ }
1068
1117
) )
1069
1118
}
1070
1119
0 commit comments