Repository navigation
feat: support Duo hinge control and secondary display capture #1287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1dce81f
feat: support Duo hinge control and secondary display capture
KazuCocoa 85dd686
remove simulator only logic, temporary implementation
KazuCocoa db7aa9a
add get
KazuCocoa f0b1617
refactor a bit
KazuCocoa b320215
refactor: separate hinge capabilities and delegate screen lookup
KazuCocoa 91baed9
fix: guard display APIs for older XCTest versions
KazuCocoa b655bf2
refactor: name hinge timeout and document runtime loading
KazuCocoa 44ab7ce
docs: explain why hinge events bypass the existing HID helper
KazuCocoa feeb4d1
revert unnecessary chnages in the readme
KazuCocoa 78b3de2
docs: clarify physical-device hinge availability and invite testing
KazuCocoa b03e7d8
docs: separate display and hinge support documentation
KazuCocoa a2cd4eb
review
KazuCocoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,41 @@ | ||
| /** | ||
| * Copyright (c) 2015-present, Facebook, Inc. | ||
| * All rights reserved. | ||
| * | ||
| * This source code is licensed under the BSD-style license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| #import <XCTest/XCTest.h> | ||
|
|
||
| NS_ASSUME_NONNULL_BEGIN | ||
|
|
||
| @interface XCUIDevice (FBHinge) | ||
|
|
||
| /** Whether a hinge and the CoreMotion angle-reading APIs are available. */ | ||
| - (BOOL)fb_supportsHingeAngleReading; | ||
|
|
||
| /** | ||
| Whether a hinge and the IOKit APIs needed to attempt injection are available. | ||
| This does not guarantee event acceptance, particularly on physical devices. | ||
| */ | ||
| - (BOOL)fb_canAttemptSimulatedHingeAngleInjection; | ||
|
|
||
| /** | ||
| Reads the current hinge angle in degrees, including changes made outside WDA. | ||
| Waits up to 5 seconds for a valid reading. Does not change the hinge angle. | ||
| @return The angle, or nil with an error if unavailable or reading times out. | ||
| */ | ||
| - (nullable NSNumber *)fb_getSimulatedHingeAngle:(NSError **)error; | ||
|
|
||
| /** | ||
| Sends a simulated hinge angle in degrees (0 = closed, 180 = fully open). | ||
| This dispatches the event; the display transition completes asynchronously. | ||
| Verified on the iPhone Duo simulator; physical-device behavior is unverified. | ||
| Does not change currentDisplayId. | ||
| */ | ||
| - (BOOL)fb_setSimulatedHingeAngle:(double)angle error:(NSError **)error; | ||
|
|
||
| @end | ||
|
|
||
| NS_ASSUME_NONNULL_END |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.