-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into win32_ensure_topmost
- Loading branch information
Showing
33 changed files
with
462 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
#import <Cocoa/Cocoa.h> | ||
#import "avalonia-native.h" | ||
|
||
// Defines the interface between AvnAutomationNode and objects which implement | ||
// NSAccessibility such as AvnAccessibilityElement or AvnWindow. | ||
@protocol AvnAccessibility <NSAccessibility> | ||
@required | ||
- (void) raiseChildrenChanged; | ||
@optional | ||
- (void) raiseFocusChanged; | ||
- (void) raisePropertyChanged:(AvnAutomationProperty)property; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
#include "avalonia-native.h" | ||
#include "AvnAccessibility.h" | ||
|
||
// Defines a means for managed code to raise accessibility events. | ||
class AvnAutomationNode : public ComSingleObject<IAvnAutomationNode, &IID_IAvnAutomationNode> | ||
{ | ||
public: | ||
FORWARD_IUNKNOWN() | ||
AvnAutomationNode(id <AvnAccessibility> owner) { _owner = owner; } | ||
AvnAccessibilityElement* GetOwner() { return _owner; } | ||
virtual void Dispose() override { _owner = nil; } | ||
virtual void ChildrenChanged () override { [_owner raiseChildrenChanged]; } | ||
virtual void PropertyChanged (AvnAutomationProperty property) override { [_owner raisePropertyChanged:property]; } | ||
virtual void FocusChanged () override { [_owner raiseFocusChanged]; } | ||
private: | ||
__strong id <AvnAccessibility> _owner; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#pragma once | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#include "AvnAccessibility.h" | ||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
class IAvnAutomationPeer; | ||
|
||
@interface AvnAccessibilityElement : NSAccessibilityElement | ||
+ (AvnAccessibilityElement *) acquire:(IAvnAutomationPeer *) peer; | ||
@interface AvnAccessibilityElement : NSAccessibilityElement <AvnAccessibility> | ||
+ (id _Nullable) acquire:(IAvnAutomationPeer *) peer; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.