summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiostextresponder.h
blob: 491dc0b6323b3152c17bd80f090f7e1dc4fd45a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#import <UIKit/UIKit.h>

#include <QtCore/qstring.h>
#include <QtGui/qevent.h>

QT_BEGIN_NAMESPACE

class QIOSInputContext;

QT_END_NAMESPACE

@interface QIOSTextResponder : UIResponder

- (instancetype)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;

- (void)notifyInputDelegate:(Qt::InputMethodQueries)updatedProperties;
- (BOOL)needsKeyboardReconfigure:(Qt::InputMethodQueries)updatedProperties;
- (void)reset;
- (void)commit;

@end

@interface QIOSTextInputResponder : QIOSTextResponder <UITextInputTraits, UIKeyInput, UITextInput>

- (instancetype)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;
- (BOOL)needsKeyboardReconfigure:(Qt::InputMethodQueries)updatedProperties;
- (void)reset;
- (void)commit;

- (void)notifyInputDelegate:(Qt::InputMethodQueries)updatedProperties;

@property(readwrite, retain) UIView *inputView;
@property(readwrite, retain) UIView *inputAccessoryView;

// UITextInputTraits
@property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
@property(nonatomic) UITextAutocorrectionType autocorrectionType;
@property(nonatomic) UITextSpellCheckingType spellCheckingType;
@property(nonatomic) BOOL enablesReturnKeyAutomatically;
@property(nonatomic) UIKeyboardAppearance keyboardAppearance;
@property(nonatomic) UIKeyboardType keyboardType;
@property(nonatomic) UIReturnKeyType returnKeyType;
@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry;

// UITextInput
@property(nonatomic, assign) id<UITextInputDelegate> inputDelegate;

@end