2020-06-15 08:12:35 +00:00
|
|
|
/* Interface of class NSAccessibilityCustomRotor
|
|
|
|
Copyright (C) 2020 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
By: Gregory John Casamento
|
|
|
|
Date: Mon 15 Jun 2020 03:18:59 AM EDT
|
|
|
|
|
|
|
|
This file is part of the GNUstep Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NSAccessibilityCustomRotor_h_GNUSTEP_GUI_INCLUDE
|
|
|
|
#define _NSAccessibilityCustomRotor_h_GNUSTEP_GUI_INCLUDE
|
2022-09-29 16:09:13 +00:00
|
|
|
#import <AppKit/AppKitDefines.h>
|
2020-06-15 08:12:35 +00:00
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
2020-06-15 09:10:09 +00:00
|
|
|
#import <Foundation/NSRange.h>
|
|
|
|
#import <Foundation/NSGeometry.h>
|
|
|
|
|
|
|
|
#import <AppKit/NSAccessibilityProtocols.h>
|
2020-06-15 08:12:35 +00:00
|
|
|
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-06-15 09:10:09 +00:00
|
|
|
@protocol NSAccessibilityCustomRotorItemSearchDelegate;
|
|
|
|
@protocol NSAccessibilityCustomRotorItemLoadDelegate;
|
|
|
|
|
|
|
|
@class NSAccessibilityCustomRotor;
|
|
|
|
@class NSAccessibilityCustomRotorItemResult;
|
|
|
|
@class NSAccessibilityCustomRotorSearchParameters;
|
|
|
|
@class NSString;
|
|
|
|
@class NSAccessibilityElement;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NSAccessibilityCustomRotorSearchDirectionPrevious,
|
|
|
|
NSAccessibilityCustomRotorSearchDirectionNext,
|
|
|
|
};
|
|
|
|
typedef NSInteger NSAccessibilityCustomRotorSearchDirection;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NSAccessibilityCustomRotorTypeCustom = 0,
|
|
|
|
NSAccessibilityCustomRotorTypeAny = 1,
|
|
|
|
NSAccessibilityCustomRotorTypeAnnotation,
|
|
|
|
NSAccessibilityCustomRotorTypeBoldText,
|
|
|
|
NSAccessibilityCustomRotorTypeHeading,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel1,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel2,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel3,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel4,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel5,
|
|
|
|
NSAccessibilityCustomRotorTypeHeadingLevel6,
|
|
|
|
NSAccessibilityCustomRotorTypeImage,
|
|
|
|
NSAccessibilityCustomRotorTypeItalicText,
|
|
|
|
NSAccessibilityCustomRotorTypeLandmark,
|
|
|
|
NSAccessibilityCustomRotorTypeLink,
|
|
|
|
NSAccessibilityCustomRotorTypeList,
|
|
|
|
NSAccessibilityCustomRotorTypeMisspelledWord,
|
|
|
|
NSAccessibilityCustomRotorTypeTable,
|
|
|
|
NSAccessibilityCustomRotorTypeTextField,
|
|
|
|
NSAccessibilityCustomRotorTypeUnderlinedText,
|
|
|
|
NSAccessibilityCustomRotorTypeVisitedLink,
|
|
|
|
};
|
|
|
|
typedef NSInteger NSAccessibilityCustomRotorType;
|
|
|
|
|
|
|
|
// Rotor...
|
2022-09-29 16:09:13 +00:00
|
|
|
APPKIT_EXPORT_CLASS
|
2020-06-15 08:12:35 +00:00
|
|
|
@interface NSAccessibilityCustomRotor : NSObject
|
2020-06-15 09:10:09 +00:00
|
|
|
|
|
|
|
- (instancetype) initWithLabel: (NSString *)label
|
|
|
|
itemSearchDelegate: (id<NSAccessibilityCustomRotorItemSearchDelegate>)delegate;
|
|
|
|
|
|
|
|
- (instancetype) initWithRotorType: (NSAccessibilityCustomRotorType)rotorType
|
|
|
|
itemSearchDelegate: (id<NSAccessibilityCustomRotorItemSearchDelegate>)delegate;
|
|
|
|
|
|
|
|
- (NSAccessibilityCustomRotorType) type;
|
|
|
|
- (void) setType: (NSAccessibilityCustomRotorType)type;
|
|
|
|
|
|
|
|
- (NSString *) label;
|
|
|
|
- (void) setLabel: (NSString *)label;
|
2020-06-15 08:12:35 +00:00
|
|
|
|
2020-06-15 09:10:09 +00:00
|
|
|
- (id<NSAccessibilityCustomRotorItemSearchDelegate>) itemSearchDelegate;
|
|
|
|
- (void) setItemSearchDelegate: (id<NSAccessibilityCustomRotorItemSearchDelegate>) delegate;
|
|
|
|
|
|
|
|
- (id<NSAccessibilityElementLoading>) itemLoadingDelegate;
|
|
|
|
- (void) setItemLoadingDelegate: (id<NSAccessibilityElementLoading>) delegate;
|
|
|
|
|
2020-06-15 08:12:35 +00:00
|
|
|
@end
|
|
|
|
|
2020-06-15 09:10:09 +00:00
|
|
|
// Results...
|
2022-09-29 16:09:13 +00:00
|
|
|
APPKIT_EXPORT_CLASS
|
2020-06-15 09:10:09 +00:00
|
|
|
@interface NSAccessibilityCustomRotorItemResult : NSObject
|
|
|
|
|
|
|
|
- (instancetype)initWithTargetElement:(id<NSAccessibilityElement>)targetElement;
|
|
|
|
|
|
|
|
- (instancetype)initWithItemLoadingToken: (id<NSAccessibilityLoadingToken>)token
|
|
|
|
customLabel: (NSString *)customLabel;
|
|
|
|
|
|
|
|
- (id<NSAccessibilityElement>) targetElement;
|
|
|
|
|
|
|
|
- (id<NSAccessibilityLoadingToken>) itemLoadingToken;
|
|
|
|
|
|
|
|
- (NSRange) targetRange;
|
|
|
|
|
|
|
|
- (NSString *) customLabel;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
// Protocol...
|
|
|
|
@protocol NSAccessibilityCustomRotorItemSearchDelegate <NSObject>
|
|
|
|
|
2020-10-06 12:49:42 +00:00
|
|
|
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
2020-06-15 09:10:09 +00:00
|
|
|
@required
|
2020-10-06 12:49:42 +00:00
|
|
|
#endif
|
2020-06-15 09:10:09 +00:00
|
|
|
- (NSAccessibilityCustomRotorItemResult *) rotor: (NSAccessibilityCustomRotor *)rotor
|
|
|
|
resultForSearchParameters: (NSAccessibilityCustomRotorSearchParameters *)parameters;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2020-06-15 08:12:35 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* GS_API_MACOSX */
|
|
|
|
|
|
|
|
#endif /* _NSAccessibilityCustomRotor_h_GNUSTEP_GUI_INCLUDE */
|
|
|
|
|