Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::SignalHandler Class Reference

#include <mock_signal_handler.h>

Inheritance diagram for flutter::testing::SignalHandler:
flutter::testing::MockSignalHandler flutter::testing::MockSignalHandler1< A1 > flutter::testing::MockSignalHandler2< A1, A2 >

Public Member Functions

 SignalHandler (gpointer instance, const gchar *name, GCallback callback)
 
virtual ~SignalHandler ()
 

Detailed Description

Definition at line 37 of file mock_signal_handler.h.

Constructor & Destructor Documentation

◆ SignalHandler()

flutter::testing::SignalHandler::SignalHandler ( gpointer  instance,
const gchar *  name,
GCallback  callback 
)

Definition at line 10 of file mock_signal_handler.cc.

12 {
13 id_ = g_signal_connect_data(instance, name, callback, this, nullptr,
14 G_CONNECT_SWAPPED);
15 g_weak_ref_init(&instance_, instance);
16}
VkInstance instance
Definition main.cc:64
FlutterDesktopBinaryReply callback
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27

References callback, instance, and flutter::name.

◆ ~SignalHandler()

flutter::testing::SignalHandler::~SignalHandler ( )
virtual

Definition at line 18 of file mock_signal_handler.cc.

18 {
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}
g_autoptr(FlEngine) engine

References g_autoptr(), and instance.


The documentation for this class was generated from the following files: