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

SDL-0238 Keyboard Enhancements #1883

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f0321a6
SDL0238 'Keyboard Enhancements': implement proposal, add auto generat…
yoooriii Dec 18, 2020
6ba9d54
SDL0238 'Keyboard Enhancements': make new headers public
yoooriii Dec 18, 2020
1d7f7c8
SDL0238 'Keyboard Enhancements': implement unit tests (pls run cartha…
yoooriii Dec 20, 2020
5d52b36
SDL0238 'Keyboard Enhancements': notify SDLKeyboardDelegate of InputK…
yoooriii Dec 20, 2020
4564dcb
SDL0238 'Keyboard Enhancements': Update a comment (as proposed in rev…
yoooriii Jan 6, 2021
6d73461
SDL0238 'Keyboard Enhancements': fix wrong parameter name (upper case…
yoooriii Jan 8, 2021
7eb10d3
SDL0238 'Keyboard Enhancements': Merge branch 'develop' into this. 2 …
yoooriii Feb 5, 2021
d64e7b2
SDL0238 'Keyboard Enhancements': fix a mistake in unit test SDLVideoS…
yoooriii Feb 6, 2021
90e6f5e
SDL0238 'Keyboard Enhancements': Merge branch 'develop' into this. Co…
yoooriii Feb 9, 2021
6fe8d4f
SDL0238 'Keyboard Enhancements r2': implement, add new classes, enums…
yoooriii Feb 9, 2021
392b961
SDL0238 'Keyboard Enhancements r2': implement unit tests
yoooriii Feb 9, 2021
d734ed1
SDL0238 'Keyboard Enhancements r2': fix SDLWindowCapability and its t…
yoooriii Feb 9, 2021
9653873
SDL0238 'Keyboard Enhancements r2': add missing tests
yoooriii Feb 9, 2021
7b4da3f
SDL0238 'Keyboard Enhancements r2': implement delegate for keyboard e…
yoooriii Feb 9, 2021
607a7bf
SDL0238 'Keyboard Enhancements r2': implement revision r2
yoooriii Feb 9, 2021
8aa0028
SDL0238 'Keyboard Enhancements r2': fix a test
yoooriii Feb 9, 2021
a777efc
SDL0238 'Keyboard Enhancements r2': fix SDLPresentKeyboardOperation t…
yoooriii Feb 9, 2021
e7ab19c
SDL0238 'Keyboard Enhancements r2': remove unused files (from 1st rev…
yoooriii Feb 9, 2021
39ff5b4
SDL0238 'Keyboard Enhancements r2': apply code review suggestions
yoooriii Feb 10, 2021
0615195
SDL0238 'Keyboard Enhancements r2': remove out of date unused test file
yoooriii Feb 10, 2021
dc911ee
SDL0238 'Keyboard Enhancements r2': update SDLKeyboardPropertiesSpec …
yoooriii Feb 10, 2021
299b907
SDL0238 'Keyboard Enhancements r2': apply review comments (keyboard o…
yoooriii Feb 13, 2021
27f2b8b
SDL0238 'Keyboard Enhancements r2': try to fix codecov warnings
yoooriii Feb 13, 2021
a49e4b7
SDL0238 'Keyboard Enhancements/r3': implement filter supported keyboa…
yoooriii Feb 17, 2021
9040b32
SDL0238 'Keyboard Enhancements/r3': update keyboard capability depend…
yoooriii Feb 17, 2021
4e90a13
SDL0238 'Keyboard Enhancements/r3': apply review comments (refine the…
yoooriii Feb 18, 2021
8bc694f
SDL0238 'Keyboard Enhancements/r3': implement test set for the new me…
yoooriii Feb 18, 2021
6d598d1
SDL0238 'Keyboard Enhancements/r4': apply code review comments, add a…
yoooriii Feb 19, 2021
9cab7e9
SDL0238 'Keyboard Enhancements/r4': add one more lost comment
yoooriii Feb 19, 2021
575f2b4
Update SmartDeviceLink/private/SDLWindowCapability+ScreenManagerExten…
yoooriii Feb 19, 2021
015b6b5
SDL0238 'Keyboard Enhancements/r4': add keyboard notification handlin…
yoooriii Feb 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
302 changes: 176 additions & 126 deletions SmartDeviceLink-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions SmartDeviceLink/private/SDLChoiceSetManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ - (void)presentChoiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode
SDLPresentChoiceSetOperation *presentOp = nil;
if (delegate == nil) {
// Non-searchable choice set
presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:nil keyboardDelegate:nil cancelID:self.nextCancelId];
presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:nil keyboardDelegate:nil cancelID:self.nextCancelId windowCapability:self.currentWindowCapability];
} else {
// Searchable choice set
presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:self.keyboardConfiguration keyboardDelegate:delegate cancelID:self.nextCancelId];
presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:self.keyboardConfiguration keyboardDelegate:delegate cancelID:self.nextCancelId windowCapability:self.currentWindowCapability];
}
self.pendingPresentOperation = presentOp;

Expand Down Expand Up @@ -421,7 +421,7 @@ - (void)presentChoiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode
SDLLogD(@"Presenting keyboard with initial text: %@", initialText);
// Present a keyboard with the choice set that we used to test VR's optional state
UInt16 keyboardCancelId = self.nextCancelId;
self.pendingPresentOperation = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:self.connectionManager keyboardProperties:self.keyboardConfiguration initialText:initialText keyboardDelegate:delegate cancelID:keyboardCancelId];
self.pendingPresentOperation = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:self.connectionManager keyboardProperties:self.keyboardConfiguration initialText:initialText keyboardDelegate:delegate cancelID:keyboardCancelId windowCapability:self.currentWindowCapability];
[self.transactionQueue addOperation:self.pendingPresentOperation];
return @(keyboardCancelId);
}
Expand Down Expand Up @@ -515,7 +515,7 @@ - (void)setKeyboardConfiguration:(nullable SDLKeyboardProperties *)keyboardConfi
}

- (SDLKeyboardProperties *)sdl_defaultKeyboardConfiguration {
return [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs keyboardLayout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteList:nil];
return [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs keyboardLayout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteList:nil maskInputCharacters:nil customKeys:nil];
}

#pragma mark - Getters
Expand Down
3 changes: 2 additions & 1 deletion SmartDeviceLink/private/SDLPresentChoiceSetOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@class SDLChoiceCell;
@class SDLChoiceSet;
@class SDLKeyboardProperties;
@class SDLWindowCapability;

@protocol SDLConnectionManagerType;
@protocol SDLKeyboardDelegate;
Expand Down Expand Up @@ -54,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
@param cancelID A unique ID for this specific choice set that allows cancellation through the `CancelInteraction` RPC.
@return A SDLPresentChoiceSetOperation object
*/
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID;
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID windowCapability:(SDLWindowCapability *)windowCapability;

@end

Expand Down
18 changes: 14 additions & 4 deletions SmartDeviceLink/private/SDLPresentChoiceSetOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#import "SDLRPCNotificationNotification.h"
#import "SDLSetGlobalProperties.h"
#import "SDLVersion.h"
#import "SDLWindowCapability+ScreenManagerExtensions.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -60,12 +61,13 @@ @interface SDLPresentChoiceSetOperation()
@property (strong, nonatomic, readwrite, nullable) SDLChoiceCell *selectedCell;
@property (strong, nonatomic, readwrite, nullable) SDLTriggerSource selectedTriggerSource;
@property (assign, nonatomic, readwrite) NSUInteger selectedCellRow;
@property (strong, nonatomic) SDLWindowCapability *windowCapability;

@end

@implementation SDLPresentChoiceSetOperation

- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID {
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID windowCapability:(SDLWindowCapability *)windowCapability {
self = [super init];
if (!self) { return self; }

Expand All @@ -86,6 +88,7 @@ - (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connecti
_cancelId = cancelID;

_selectedCellRow = NSNotFound;
_windowCapability = windowCapability;

return self;
}
Expand Down Expand Up @@ -121,15 +124,16 @@ - (void)sdl_start {
#pragma mark - Sending Requests

- (void)sdl_updateKeyboardPropertiesWithCompletionHandler:(nullable void(^)(void))completionHandler {
if (self.keyboardProperties == nil) {
// Create the keyboard configuration based on the window capability's keyboard capabilities
SDLKeyboardProperties *modifiedKeyboardConfig = [self.windowCapability createValidKeyboardConfigurationBasedOnKeyboardCapabilitiesFromConfiguration:self.keyboardProperties];
if (modifiedKeyboardConfig == nil) {
if (completionHandler != nil) {
completionHandler();
}
return;
}

SDLSetGlobalProperties *setProperties = [[SDLSetGlobalProperties alloc] init];
setProperties.keyboardProperties = self.keyboardProperties;
setProperties.keyboardProperties = modifiedKeyboardConfig;

__weak typeof(self) weakself = self;
[self.connectionManager sendConnectionRequest:setProperties withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
Expand Down Expand Up @@ -295,6 +299,12 @@ - (void)sdl_keyboardInputNotification:(SDLRPCNotificationNotification *)notifica
} else if ([onKeyboard.event isEqualToEnum:SDLKeyboardEventAborted] || [onKeyboard.event isEqualToEnum:SDLKeyboardEventCancelled]) {
// Notify of abort / cancellation
[self.keyboardDelegate keyboardDidAbortWithReason:onKeyboard.event];
} else if ([onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskEnabled] || [onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskDisabled]) {
// Notify of key mask change
if ([self.keyboardDelegate respondsToSelector:@selector(keyboardDidUpdateInputMask:)]) {
BOOL isEnabled = [onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskEnabled];
[self.keyboardDelegate keyboardDidUpdateInputMask:isEnabled];
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion SmartDeviceLink/private/SDLPresentKeyboardOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#import "NSNumber+NumberType.h"

@class SDLKeyboardProperties;
@class SDLWindowCapability;


@protocol SDLConnectionManagerType;
@protocol SDLKeyboardDelegate;
Expand All @@ -33,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
@param cancelID An ID for this specific keyboard to allow cancellation through the `CancelInteraction` RPC.
@return A SDLPresentKeyboardOperation object
*/
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID;
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID windowCapability:(SDLWindowCapability *)windowCapability;

/**
Cancels the keyboard-only interface if it is currently showing. If the keyboard has not yet been sent to Core, it will not be sent.
Expand Down
21 changes: 19 additions & 2 deletions SmartDeviceLink/private/SDLPresentKeyboardOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#import "SDLRPCNotificationNotification.h"
#import "SDLSetGlobalProperties.h"
#import "SDLVersion.h"
#import "SDLWindowCapability+ScreenManagerExtensions.h"

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -37,12 +38,13 @@ @interface SDLPresentKeyboardOperation()
@property (strong, nonatomic, readonly) SDLPerformInteraction *performInteraction;

@property (copy, nonatomic, nullable) NSError *internalError;
@property (strong, nonatomic) SDLWindowCapability *windowCapability;

@end

@implementation SDLPresentKeyboardOperation

- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID {
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID windowCapability:(SDLWindowCapability *)windowCapability {
self = [super init];
if (!self) { return self; }

Expand All @@ -53,6 +55,7 @@ - (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connecti
_keyboardProperties = originalKeyboardProperties;
_cancelId = cancelID;
_operationId = [NSUUID UUID];
_windowCapability = windowCapability;

return self;
}
Expand Down Expand Up @@ -87,8 +90,16 @@ - (void)sdl_start {
#pragma mark - Sending Requests

- (void)sdl_updateKeyboardPropertiesWithCompletionHandler:(nullable void(^)(void))completionHandler {
// Create the keyboard configuration based on the window capability's keyboard capabilities
SDLKeyboardProperties *keyboardConfiguration = [self.windowCapability createValidKeyboardConfigurationBasedOnKeyboardCapabilitiesFromConfiguration:self.keyboardProperties];
if (keyboardConfiguration == nil) {
if (completionHandler != nil) {
completionHandler();
}
return;
}
SDLSetGlobalProperties *setProperties = [[SDLSetGlobalProperties alloc] init];
setProperties.keyboardProperties = self.keyboardProperties;
setProperties.keyboardProperties = keyboardConfiguration;

[self.connectionManager sendConnectionRequest:setProperties withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if (error != nil) {
Expand Down Expand Up @@ -209,6 +220,12 @@ - (void)sdl_keyboardInputNotification:(SDLRPCNotificationNotification *)notifica
} else if ([onKeyboard.event isEqualToEnum:SDLKeyboardEventAborted] || [onKeyboard.event isEqualToEnum:SDLKeyboardEventCancelled]) {
// Notify of abort / cancellation
[self.keyboardDelegate keyboardDidAbortWithReason:onKeyboard.event];
} else if ([onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskEnabled] || [onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskDisabled]) {
yoooriii marked this conversation as resolved.
Show resolved Hide resolved
yoooriii marked this conversation as resolved.
Show resolved Hide resolved
// Notify of key mask change
if ([self.keyboardDelegate respondsToSelector:@selector(keyboardDidUpdateInputMask:)]) {
BOOL isEnabled = [onKeyboard.event isEqualToEnum:SDLKeyboardEventInputKeyMaskEnabled];
[self.keyboardDelegate keyboardDidUpdateInputMask:isEnabled];
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions SmartDeviceLink/private/SDLRPCParameterNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameCurrentForecastSupported;
extern SDLRPCParameterName const SDLRPCParameterNameCurrentTemperature;
extern SDLRPCParameterName const SDLRPCParameterNameCushion;
extern SDLRPCParameterName const SDLRPCParameterNameCustomButtonId;
extern SDLRPCParameterName const SDLRPCParameterNameCustomKeys;
extern SDLRPCParameterName const SDLRPCParameterNameCustomPresets;
extern SDLRPCParameterName const SDLRPCParameterNameOEMCustomDataType;
extern SDLRPCParameterName const SDLRPCParameterNameData;
Expand Down Expand Up @@ -354,6 +355,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameIsSubscribed;
extern SDLRPCParameterName const SDLRPCParameterNameJunctionType;
extern SDLRPCParameterName const SDLRPCParameterNameKeepContext;
extern SDLRPCParameterName const SDLRPCParameterNameKeepContextAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameKeyboardCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameKeyboardLayout;
extern SDLRPCParameterName const SDLRPCParameterNameKeyboardProperties;
extern SDLRPCParameterName const SDLRPCParameterNameKeypressMode;
Expand Down Expand Up @@ -400,6 +402,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameMajorVersion;
extern SDLRPCParameterName const SDLRPCParameterNameMake;
extern SDLRPCParameterName const SDLRPCParameterNameManeuverComplete;
extern SDLRPCParameterName const SDLRPCParameterNameManualTextEntry;
extern SDLRPCParameterName const SDLRPCParameterNameMaskInputCharacters;
extern SDLRPCParameterName const SDLRPCParameterNameMaskInputCharactersSupported;
extern SDLRPCParameterName const SDLRPCParameterNameMassageCushionFirmness;
extern SDLRPCParameterName const SDLRPCParameterNameMassageCushionFirmnessAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMassageEnabled;
Expand Down Expand Up @@ -485,6 +489,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameNotification;
extern SDLRPCParameterName const SDLRPCParameterNameNumber;
extern SDLRPCParameterName const SDLRPCParameterNameNumberCustomPresetsAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameNumberTicks;
extern SDLRPCParameterName const SDLRPCParameterNameNumConfigurableKeys;
extern SDLRPCParameterName const SDLRPCParameterNameOdometer;
extern SDLRPCParameterName const SDLRPCParameterNameOffset;
extern SDLRPCParameterName const SDLRPCParameterNameOnLockScreenStatus;
Expand Down Expand Up @@ -675,6 +680,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameSupportedDiagnosticModes;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames;
extern SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedFormats;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedKeyboards;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedLights;
extern SDLRPCParameterName const SDLRPCParameterNameSyncFileName;
extern SDLRPCParameterName const SDLRPCParameterNameSyncMessageVersion;
Expand Down
6 changes: 6 additions & 0 deletions SmartDeviceLink/private/SDLRPCParameterNames.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
SDLRPCParameterName const SDLRPCParameterNameCurrentTemperature = @"currentTemperature";
SDLRPCParameterName const SDLRPCParameterNameCushion = @"cushion";
SDLRPCParameterName const SDLRPCParameterNameCustomButtonId = @"customButtonID";
SDLRPCParameterName const SDLRPCParameterNameCustomKeys = @"customKeys";
SDLRPCParameterName const SDLRPCParameterNameCustomPresets = @"customPresets";
SDLRPCParameterName const SDLRPCParameterNameData = @"data";
SDLRPCParameterName const SDLRPCParameterNameDataResult = @"dataResult";
Expand Down Expand Up @@ -353,6 +354,7 @@
SDLRPCParameterName const SDLRPCParameterNameJunctionType = @"junctionType";
SDLRPCParameterName const SDLRPCParameterNameKeepContext = @"keepContext";
SDLRPCParameterName const SDLRPCParameterNameKeepContextAvailable = @"keepContextAvailable";
SDLRPCParameterName const SDLRPCParameterNameKeyboardCapabilities = @"keyboardCapabilities";
SDLRPCParameterName const SDLRPCParameterNameKeyboardLayout = @"keyboardLayout";
SDLRPCParameterName const SDLRPCParameterNameKeyboardProperties = @"keyboardProperties";
SDLRPCParameterName const SDLRPCParameterNameKeypressMode = @"keypressMode";
Expand Down Expand Up @@ -395,6 +397,8 @@
SDLRPCParameterName const SDLRPCParameterNameMake = @"make";
SDLRPCParameterName const SDLRPCParameterNameManeuverComplete = @"maneuverComplete";
SDLRPCParameterName const SDLRPCParameterNameManualTextEntry = @"manualTextEntry";
SDLRPCParameterName const SDLRPCParameterNameMaskInputCharacters = @"maskInputCharacters";
SDLRPCParameterName const SDLRPCParameterNameMaskInputCharactersSupported = @"maskInputCharactersSupported";
SDLRPCParameterName const SDLRPCParameterNameMassageCushionFirmness = @"massageCushionFirmness";
SDLRPCParameterName const SDLRPCParameterNameMassageCushionFirmnessAvailable = @"massageCushionFirmnessAvailable";
SDLRPCParameterName const SDLRPCParameterNameMassageEnabled = @"massageEnabled";
Expand Down Expand Up @@ -480,6 +484,7 @@
SDLRPCParameterName const SDLRPCParameterNameNumber = @"number";
SDLRPCParameterName const SDLRPCParameterNameNumberCustomPresetsAvailable = @"numCustomPresetsAvailable";
SDLRPCParameterName const SDLRPCParameterNameNumberTicks = @"numTicks";
SDLRPCParameterName const SDLRPCParameterNameNumConfigurableKeys = @"numConfigurableKeys";
SDLRPCParameterName const SDLRPCParameterNameOdometer = @"odometer";
SDLRPCParameterName const SDLRPCParameterNameOEMCustomDataType = @"oemCustomDataType";
SDLRPCParameterName const SDLRPCParameterNameOffset = @"offset";
Expand Down Expand Up @@ -671,6 +676,7 @@
SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames = @"supportedDynamicImageFieldNames";
SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus = @"supportsDynamicSubMenus";
SDLRPCParameterName const SDLRPCParameterNameSupportedFormats = @"supportedFormats";
SDLRPCParameterName const SDLRPCParameterNameSupportedKeyboards = @"supportedKeyboards";
SDLRPCParameterName const SDLRPCParameterNameSupportedLights = @"supportedLights";
SDLRPCParameterName const SDLRPCParameterNameSyncFileName = @"syncFileName";
SDLRPCParameterName const SDLRPCParameterNameSyncMessageVersion = @"syncMsgVersion";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#import "SDLTextFieldName.h"
#import "SDLWindowCapability.h"

@class SDLKeyboardProperties;

NS_ASSUME_NONNULL_BEGIN

@interface SDLWindowCapability (ScreenManagerExtensions)
Expand All @@ -21,6 +23,13 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)hasTextFieldOfName:(SDLTextFieldName)name;
- (BOOL)hasImageFieldOfName:(SDLImageFieldName)name;

/// Takes a keyboard configuration (SDLKeyboardProperties) and creates a valid version of it, if possible, based on this object's internal keyboardCapabilities (SDLKeyboardCapabilities).
/// If there is no internal keyboardCapabilities, it will just return the passed configuration as-is.
/// If no valid configuration can be determined based on the internal keyboard capabilities, it will return nil.
/// @param keyboardConfiguration The configuration to use to determine a valid configuration
/// @return The passed keyboardConfiguration if there are no changes needed or possible, a modified keyboardConfiguration if a valid version of the configuration could be determined, or nil if a valid configuration could not be created
- (nullable SDLKeyboardProperties *)createValidKeyboardConfigurationBasedOnKeyboardCapabilitiesFromConfiguration:(nullable SDLKeyboardProperties *)keyboardConfiguration;

@end

NS_ASSUME_NONNULL_END
Loading