@@ -418,7 +418,7 @@ public extension CustardInterface {
418
418
419
419
/// - キーのデザイン
420
420
/// - design information of key
421
- public struct CustardKeyDesign : Codable , Equatable {
421
+ public struct CustardKeyDesign : Codable , Equatable , Hashable {
422
422
public init ( label: CustardKeyLabelStyle , color: CustardKeyDesign . ColorType ) {
423
423
self . label = label
424
424
self . color = color
@@ -437,7 +437,7 @@ public struct CustardKeyDesign: Codable, Equatable {
437
437
438
438
/// - バリエーションのキーのデザイン
439
439
/// - design information of key
440
- public struct CustardVariationKeyDesign : Codable , Equatable {
440
+ public struct CustardVariationKeyDesign : Codable , Equatable , Hashable {
441
441
public init ( label: CustardKeyLabelStyle ) {
442
442
self . label = label
443
443
}
@@ -447,13 +447,13 @@ public struct CustardVariationKeyDesign: Codable, Equatable {
447
447
448
448
/// - キーに指定するラベル
449
449
/// - labels on the key
450
- public enum CustardKeyLabelStyle : Codable , Equatable {
450
+ public enum CustardKeyLabelStyle : Codable , Equatable , Hashable {
451
451
case text( String )
452
452
case systemImage( String )
453
453
}
454
454
455
- public extension CustardKeyLabelStyle {
456
- private enum CodingKeys : CodingKey {
455
+ public extension CustardKeyLabelStyle {
456
+ private enum CodingKeys : CodingKey {
457
457
case text
458
458
case system_image
459
459
}
@@ -502,13 +502,13 @@ public extension CustardKeyLabelStyle{
502
502
}
503
503
504
504
/// - key's data in interface
505
- public enum CustardInterfaceKey : Equatable {
505
+ public enum CustardInterfaceKey : Equatable , Hashable {
506
506
case system( CustardInterfaceSystemKey )
507
507
case custom( CustardInterfaceCustomKey )
508
508
}
509
509
510
510
/// - keys prepared in default
511
- public enum CustardInterfaceSystemKey : Codable , Equatable {
511
+ public enum CustardInterfaceSystemKey : Codable , Equatable , Hashable {
512
512
/// - the globe key
513
513
case changeKeyboard
514
514
@@ -583,7 +583,7 @@ public extension CustardInterfaceSystemKey{
583
583
}
584
584
585
585
/// - keys you can defined
586
- public struct CustardInterfaceCustomKey : Codable , Equatable {
586
+ public struct CustardInterfaceCustomKey : Codable , Equatable , Hashable {
587
587
public init ( design: CustardKeyDesign , press_actions: [ CodableActionData ] , longpress_actions: CodableLongpressActionData , variations: [ CustardInterfaceVariation ] ) {
588
588
self . design = design
589
589
self . press_actions = press_actions
@@ -734,7 +734,7 @@ public extension CustardInterfaceCustomKey {
734
734
}
735
735
736
736
/// - variation of key, includes flick keys and selectable variations in pc style keyboard.
737
- public struct CustardInterfaceVariation : Codable , Equatable {
737
+ public struct CustardInterfaceVariation : Codable , Equatable , Hashable {
738
738
public init ( type: VariationType , key: CustardInterfaceVariationKey ) {
739
739
self . type = type
740
740
self . key = key
@@ -748,7 +748,7 @@ public struct CustardInterfaceVariation: Codable, Equatable {
748
748
749
749
/// - キーの変種の種類
750
750
/// - type of key variation
751
- public enum VariationType : Equatable {
751
+ public enum VariationType : Equatable , Hashable {
752
752
/// - variation of flick
753
753
/// - warning: when you use pc style, this type of variation would be ignored.
754
754
case flickVariation( FlickDirection )
@@ -805,7 +805,7 @@ public extension CustardInterfaceVariation {
805
805
}
806
806
807
807
/// - data of variation key
808
- public struct CustardInterfaceVariationKey : Codable , Equatable {
808
+ public struct CustardInterfaceVariationKey : Codable , Equatable , Hashable {
809
809
public init ( design: CustardVariationKeyDesign , press_actions: [ CodableActionData ] , longpress_actions: CodableLongpressActionData ) {
810
810
self . design = design
811
811
self . press_actions = press_actions
@@ -1111,7 +1111,7 @@ public extension CodableActionData{
1111
1111
}
1112
1112
1113
1113
1114
- public struct CodableLongpressActionData : Codable , Equatable {
1114
+ public struct CodableLongpressActionData : Codable , Equatable , Hashable {
1115
1115
public static let none = CodableLongpressActionData ( )
1116
1116
public init ( start: [ CodableActionData ] = [ ] , repeat : [ CodableActionData ] = [ ] ) {
1117
1117
self . start = start
0 commit comments