| Flutter iOS Embedder |

FlutterFakeKeyEvents.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERFAKEKEYEVENTS_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERFAKEKEYEVENTS_H_
7
8 #import <Foundation/Foundation.h>
9 #import <OCMock/OCMock.h>
10 #import <UIKit/UIKit.h>
11
12 #import "flutter/shell/platform/darwin/ios/InternalFlutterSwift/InternalFlutterSwift.h"
13
14 API_AVAILABLE(ios(13.4))
15 @interface FakeUIKey : UIKey
16 - (instancetype)initWithData:(UIKeyboardHIDUsage)keyCode
17 modifierFlags:(UIKeyModifierFlags)modifierFlags
18 characters:(NSString*)characters
19 charactersIgnoringModifiers:(NSString*)charactersIgnoringModifiers API_AVAILABLE(ios(13.4));
20
21 - (UIKeyboardHIDUsage)keyCode;
22 - (UIKeyModifierFlags)modifierFlags;
23 - (NSString*)characters;
24 - (NSString*)charactersIgnoringModifiers;
25
26 @property(assign, nonatomic) UIKeyboardHIDUsage dataKeyCode;
27 @property(assign, nonatomic) UIKeyModifierFlags dataModifierFlags;
28 @property(readwrite, nonatomic) NSString* dataCharacters;
29 @property(readwrite, nonatomic) NSString* dataCharactersIgnoringModifiers;
30 @end
31
32 namespace flutter {
33 namespace testing {
34 extern FlutterUIPressProxy* keyDownEvent(UIKeyboardHIDUsage keyCode,
35 UIKeyModifierFlags modifierFlags = 0x0,
36 NSTimeInterval timestamp = 0.0f,
37 const char* characters = "",
38 const char* charactersIgnoringModifiers = "")
39 API_AVAILABLE(ios(13.4));
40
41 extern FlutterUIPressProxy* keyUpEvent(UIKeyboardHIDUsage keyCode,
42 UIKeyModifierFlags modifierFlags = 0x0,
43 NSTimeInterval timestamp = 0.0f,
44 const char* characters = "",
45 const char* charactersIgnoringModifiers = "")
46 API_AVAILABLE(ios(13.4));
47
48 extern FlutterUIPressProxy* keyEventWithPhase(UIPressPhase phase,
49 UIKeyboardHIDUsage keyCode,
50 UIKeyModifierFlags modifierFlags = 0x0,
51 NSTimeInterval timestamp = 0.0f,
52 const char* characters = "",
53 const char* charactersIgnoringModifiers = "")
54 API_AVAILABLE(ios(13.4));
55 } // namespace testing
56 } // namespace flutter
57
58 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERFAKEKEYEVENTS_H_
API_AVAILABLE
UITextSmartQuotesType smartQuotesType API_AVAILABLE(ios(11.0))
FakeUIKey
Definition: FlutterFakeKeyEvents.h:16
FakeUIKey::dataModifierFlags
UIKeyModifierFlags dataModifierFlags
Definition: FlutterFakeKeyEvents.h:27
FakeUIKey::dataCharacters
NSString * dataCharacters
Definition: FlutterFakeKeyEvents.h:28
-[FakeUIKey keyCode]
UIKeyboardHIDUsage keyCode()
-[FakeUIKey modifierFlags]
UIKeyModifierFlags modifierFlags()
FakeUIKey::dataCharactersIgnoringModifiers
NSString * dataCharactersIgnoringModifiers
Definition: FlutterFakeKeyEvents.h:29
-[FakeUIKey charactersIgnoringModifiers]
NSString * charactersIgnoringModifiers()
-[FakeUIKey characters]
NSString * characters()
FakeUIKey::dataKeyCode
UIKeyboardHIDUsage dataKeyCode
Definition: FlutterFakeKeyEvents.h:26
flutter::testing::keyEventWithPhase
FlutterUIPressProxy * keyEventWithPhase(UIPressPhase phase, UIKeyboardHIDUsage keyCode, UIKeyModifierFlags modifierFlags=0x0, NSTimeInterval timestamp=0.0f, const char *characters="", const char *charactersIgnoringModifiers="") API_AVAILABLE(ios(13.4))
Definition: FlutterFakeKeyEvents.mm:78
flutter::testing::keyUpEvent
FlutterUIPressProxy * keyUpEvent(UIKeyboardHIDUsage keyCode, UIKeyModifierFlags modifierFlags=0x0, NSTimeInterval timestamp=0.0f, const char *characters="", const char *charactersIgnoringModifiers="") API_AVAILABLE(ios(13.4))
Definition: FlutterFakeKeyEvents.mm:69
flutter::testing::keyDownEvent
FlutterUIPressProxy * keyDownEvent(UIKeyboardHIDUsage keyCode, UIKeyModifierFlags modifierFlags=0x0, NSTimeInterval timestamp=0.0f, const char *characters="", const char *charactersIgnoringModifiers="") API_AVAILABLE(ios(13.4))
Definition: FlutterFakeKeyEvents.mm:59
flutter
Definition: accessibility_bridge.h:26