Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
linux
testing
mock_signal_handler.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_signal_handler.h"
6
7
namespace
flutter
{
8
namespace
testing {
9
10
SignalHandler::SignalHandler
(gpointer
instance
,
11
const
gchar*
name
,
12
GCallback
callback
)
13
: instance_(
instance
) {
14
id_ = g_signal_connect_data(
instance
,
name
,
callback
,
this
,
nullptr
,
15
G_CONNECT_SWAPPED);
16
g_object_add_weak_pointer
(G_OBJECT(
instance
), &instance_);
17
}
18
19
SignalHandler::~SignalHandler
() {
20
if
(instance_) {
21
g_signal_handler_disconnect(instance_, id_);
22
g_object_remove_weak_pointer(G_OBJECT(instance_), &instance_);
23
}
24
}
25
26
}
// namespace testing
27
}
// namespace flutter
flutter::testing::SignalHandler::SignalHandler
SignalHandler(gpointer instance, const gchar *name, GCallback callback)
Definition
mock_signal_handler.cc:10
flutter::testing::SignalHandler::~SignalHandler
virtual ~SignalHandler()
Definition
mock_signal_handler.cc:19
instance
VkInstance instance
Definition
main.cc:48
callback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Definition
fl_key_channel_responder.cc:120
g_object_add_weak_pointer
g_object_add_weak_pointer(G_OBJECT(self), reinterpret_cast< gpointer * >(&self->engine))
flutter
Definition
asset_manager.cc:10
flutter::name
DEF_SWITCHES_START aot vmservice shared library name
Definition
switches.h:32
Generated on Fri Apr 26 2024 06:14:32 for Flutter Engine by
1.9.8