forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fl_keyboard_view_delegate.h
55 lines (44 loc) · 1.59 KB
/
fl_keyboard_view_delegate.h
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
52
53
54
55
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_VIEW_DELEGATE_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_VIEW_DELEGATE_H_
#include <gdk/gdk.h>
#include <cinttypes>
#include <functional>
#include <memory>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_key_event.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
G_BEGIN_DECLS
G_DECLARE_INTERFACE(FlKeyboardViewDelegate,
fl_keyboard_view_delegate,
FL,
KEYBOARD_VIEW_DELEGATE,
GObject);
/**
* FlKeyboardViewDelegate:
*
* An interface for a class that provides `FlKeyboardHandler` with
* platform-related features.
*
* This interface is typically implemented by `FlView`.
*/
struct _FlKeyboardViewDelegateInterface {
GTypeInterface g_iface;
gboolean (*text_filter_key_press)(FlKeyboardViewDelegate* delegate,
FlKeyEvent* event);
};
/**
* fl_keyboard_view_delegate_text_filter_key_press:
*
* Handles `FlKeyboardHandler`'s request to check if the GTK text input IM
* filter would like to handle a GDK event.
*
* The ownership of the `event` is kept by the keyboard handler.
*/
gboolean fl_keyboard_view_delegate_text_filter_key_press(
FlKeyboardViewDelegate* delegate,
FlKeyEvent* event);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_VIEW_DELEGATE_H_