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

Implement IRangeValueProvider #12356

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

YajurG
Copy link
Contributor

@YajurG YajurG commented Nov 6, 2023

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Implements the IRangeValueProvider and supporting methods which is used to provide support for controls that can be set to a value within a range.

What

Implemented SetValue, get_Value, get_Minimum and get_Maximum methods as part of the IRangeValueProvider interface.
TODO: implment get_SmallChange and get_LargeChange.

Screenshots

After:
image

Testing

Tested locally on playground.

Changelog

Yes




return S_OK;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HRESULT __stdcall CompositionDynamicAutomationProvider::get_SmallChange(double *pRetVal) {
if (pRetVal == nullptr)
return E_POINTER;
return S_OK;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return quiet NaN

@@ -158,6 +158,13 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPatternProvider(PATTE
AddRef();
}

if (patternId == UIA_RangeValuePatternId) {
*pRetVal = static_cast<IRangeValueProvider *>(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably only return this pattern if the role is set to something that aligns with this pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also do a role check for UIA_ValuePatternId as well (i.e if the role is not 'adjustable' or 'progressbar' since those roles correspond to RangeValuePattern?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea i think we'll want roles checks for each of these!

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.

None yet

4 participants