Skip to content
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

Obtain an AccessibleProxy from any ObjectRef with ObjectRefExt #182

Merged
merged 3 commits into from
May 8, 2024

Conversation

luukvanderduim
Copy link
Collaborator

It is assumed that all objects in any server's tree implements the Accessible interface.
Therefore it would be very convenient to quickly obtain a AccessibleProxy on an object.

Bringing ObjectRefExt into scope allows users to call as_accessible_proxy on any ObjectRef to obtain an AccessibleProxy from the ObjectRef.

All objects in any server's tree implements the `Accessible` interface.

Bringing `ObjectRefExt` into scope allows users to call `as_accessible_proxy`
on any `ObjectRef` to obtain an `AccessibleProxy` from the `ObjectRef`.
Copy link

codecov bot commented Apr 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 83.74%. Comparing base (655be70) to head (85d7518).

Files Patch % Lines
atspi-proxies/src/accessible.rs 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   84.14%   83.74%   -0.41%     
==========================================
  Files          39       39              
  Lines        3097     3112      +15     
==========================================
  Hits         2606     2606              
- Misses        491      506      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Makes the trait public
In the trait definition, adds the send bound
in the impl, resuggars the impl
@luukvanderduim
Copy link
Collaborator Author

We cannot do the same with TryFrom<ObjectRef> for AccessibleProxy because the proxy builder needs a zbus::Connection as argument.

This is probably the best we can do.

@luukvanderduim luukvanderduim marked this pull request as ready for review April 30, 2024 10:09
@TTWNO
Copy link
Member

TTWNO commented May 8, 2024

This is a great usability improvement for users of atspi, and only adds a few lines of code.

Since this is somewhat non-trivial to test, I'm going to ignore codecov.

@TTWNO TTWNO merged commit 5c684a9 into main May 8, 2024
11 of 12 checks passed
@TTWNO TTWNO deleted the objectref2accessibleproxy branch May 8, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants