Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
mock_text_input_view_delegate.cc
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#include "flutter/shell/platform/linux/testing/mock_text_input_view_delegate.h"
6
7using namespace flutter::testing;
8
9G_DECLARE_FINAL_TYPE(FlMockTextInputViewDelegate,
10 fl_mock_text_input_view_delegate,
11 FL,
12 MOCK_TEXT_INPUT_VIEW_DELEGATE,
13 GObject)
14
15struct _FlMockTextInputViewDelegate {
16 GObject parent_instance;
18};
19
20static FlTextInputViewDelegate* fl_mock_text_input_view_delegate_new(
22 FlMockTextInputViewDelegate* self = FL_MOCK_TEXT_INPUT_VIEW_DELEGATE(
23 g_object_new(fl_mock_text_input_view_delegate_get_type(), nullptr));
24 self->mock = mock;
25 return FL_TEXT_INPUT_VIEW_DELEGATE(self);
26}
27
30
32 if (FL_IS_TEXT_INPUT_VIEW_DELEGATE(instance_)) {
33 g_clear_object(&instance_);
34 }
35}
36
37MockTextInputViewDelegate::operator FlTextInputViewDelegate*() {
38 return instance_;
39}
40
42 FlTextInputViewDelegateInterface* iface);
43
45 FlMockTextInputViewDelegate,
46 fl_mock_text_input_view_delegate,
47 G_TYPE_OBJECT,
48 G_IMPLEMENT_INTERFACE(fl_text_input_view_delegate_get_type(),
50
51static void fl_mock_text_input_view_delegate_class_init(
52 FlMockTextInputViewDelegateClass* klass) {}
53
55 FlTextInputViewDelegate* view_delegate,
56 gint view_x,
57 gint view_y,
58 gint* window_x,
59 gint* window_y) {
60 g_return_if_fail(FL_IS_MOCK_TEXT_INPUT_VIEW_DELEGATE(view_delegate));
61 FlMockTextInputViewDelegate* self =
62 FL_MOCK_TEXT_INPUT_VIEW_DELEGATE(view_delegate);
63 self->mock->fl_text_input_view_delegate_translate_coordinates(
64 view_delegate, view_x, view_y, window_x, window_y);
65}
66
68 FlTextInputViewDelegateInterface* iface) {
69 iface->translate_coordinates =
71}
72
74 FlMockTextInputViewDelegate* self) {}
G_DEFINE_TYPE_WITH_CODE(FlAccessibleNode, fl_accessible_node, ATK_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(ATK_TYPE_COMPONENT, fl_accessible_node_component_interface_init) G_IMPLEMENT_INTERFACE(ATK_TYPE_ACTION, fl_accessible_node_action_interface_init)) static gboolean flag_is_changed(FlutterSemanticsFlag old_flags
static FlTextInputViewDelegate * fl_mock_text_input_view_delegate_new(MockTextInputViewDelegate *mock)
static void fl_mock_text_input_view_delegate_init(FlMockTextInputViewDelegate *self)
G_DECLARE_FINAL_TYPE(FlMockTextInputViewDelegate, fl_mock_text_input_view_delegate, FL, MOCK_TEXT_INPUT_VIEW_DELEGATE, GObject) struct _FlMockTextInputViewDelegate
static void fl_mock_text_input_view_delegate_translate_coordinates(FlTextInputViewDelegate *view_delegate, gint view_x, gint view_y, gint *window_x, gint *window_y)
static void fl_mock_text_input_view_delegate_iface_init(FlTextInputViewDelegateInterface *iface)