Skip to content

Commit

Permalink
Adding accessibilityMinValue and accessibilityMaxValue
Browse files Browse the repository at this point in the history
  • Loading branch information
azuev-java committed Nov 15, 2023
1 parent 73bf00a commit 140efce
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,28 @@ - (id)accessibilityValue
return variantToID(env, jresult);
}

- (id)accessibilityMinValue
{
jobject jresult = NULL;
GET_MAIN_JENV;
if (env == NULL) return NULL;
jresult = (jobject)(*env)->CallLongMethod(env, self->jAccessible,
jAccessibilityAttributeValue, (jlong)@"AXMinValue");
GLASS_CHECK_EXCEPTION(env);
return variantToID(env, jresult);
}

- (id)accessibilityMaxValue
{
jobject jresult = NULL;
GET_MAIN_JENV;
if (env == NULL) return NULL;
jresult = (jobject)(*env)->CallLongMethod(env, self->jAccessible,
jAccessibilityAttributeValue, (jlong)@"AXMaxValue");
GLASS_CHECK_EXCEPTION(env);
return variantToID(env, jresult);
}

- (NSString *)accessibilityLabel
{
jobject jresult = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,23 @@ - (id)accessibilityValue
return [super accessibilityValue];
}

- (id)accessibilityMinValue
{
return [super accessibilityMinValue];
}

- (id)accessibilityMaxValue
{
return [super accessibilityMaxValue];
}

- (BOOL)accessibilityPerformIncrement
{
// NSLog(@"Stepper increment action invoked");
return [self performAccessibleAction:INCREMENT];
}

- (BOOL)accessibilityPerformDecrement
{
// NSLog(@"Stepper decrement action invoked");
return [self performAccessibleAction:DECREMENT];
}

Expand Down

0 comments on commit 140efce

Please sign in to comment.