Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
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
6
7namespace flutter {
8namespace testing {
9
11 const gchar* name,
12 GCallback callback) {
13 id_ = g_signal_connect_data(instance, name, callback, this, nullptr,
14 G_CONNECT_SWAPPED);
15 g_weak_ref_init(&instance_, instance);
16}
17
19 g_autoptr(GObject) instance = G_OBJECT(g_weak_ref_get(&instance_));
20 if (instance != nullptr) {
21 g_signal_handler_disconnect(instance, id_);
22 }
23 g_weak_ref_clear(&instance_);
24}
25
26} // namespace testing
27} // namespace flutter
SignalHandler(gpointer instance, const gchar *name, GCallback callback)
VkInstance instance
Definition main.cc:64
g_autoptr(FlEngine) engine
FlutterDesktopBinaryReply callback
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27