| Flutter Linux Embedder |

Classes | Macros | Functions | Variables
fl_key_responder.h File Reference
`#include <gdk/gdk.h>`
`#include <cinttypes>`
`#include "flutter/shell/platform/linux/fl_key_event.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h"`

Go to the source code of this file.

## Classes
struct | _FlKeyResponderInterface

## Macros
#define | FL_TYPE_KEY_RESPONDER fl_key_responder_get_type()

## Functions
| G_DECLARE_INTERFACE (FlKeyResponder, fl_key_responder, FL, KEY_RESPONDER, GObject)
void | fl_key_responder_handle_event (FlKeyResponder *responder, FlKeyEvent *event, FlKeyResponderAsyncCallback callback, gpointer user_data, uint64_t specified_logical_key=0)

## Variables
G_BEGIN_DECLS typedef void(* | FlKeyResponderAsyncCallback )(bool handled, gpointer user_data)

## Macro Definition Documentation

## ◆ FL_TYPE_KEY_RESPONDER

#define FL_TYPE_KEY_RESPONDER fl_key_responder_get_type()

Definition at line 28 of file fl_key_responder.h.

## Function Documentation

## ◆ fl_key_responder_handle_event()

void fl_key_responder_handle_event | ( | FlKeyResponder * | responder,
|  | FlKeyEvent * | event,
|  | FlKeyResponderAsyncCallback | callback,
|  | gpointer | user_data,
|  | uint64_t | specified_logical_key = `0`
| ) |  |

fl_key_responder_handle_event: @responder: the #FlKeyResponder self. @event: the event to be handled. Must not be null. The object is managed by callee and must not be assumed available after this function. @callback: the callback to report the result. It should be called exactly once. Must not be null. @user_data: a value that will be sent back in the callback. Can be null.

Let the responder handle an event, expecting the responder to report whether to handle the event. The result will be reported by invoking `callback` exactly once, which might happen after `fl_key_responder_handle_event` or during it.

Definition at line 11 of file fl_key_responder.cc.

15 {
16 g_return_if_fail(FL_IS_KEY_RESPONDER(self));
17 g_return_if_fail(event != nullptr);
18 g_return_if_fail(callback != nullptr);
19
20 FL_KEY_RESPONDER_GET_IFACE(self)->handle_event(
21 self, event, specified_logical_key, callback, user_data);
22 }

References callback, event, specified_logical_key, and user_data.

Referenced by dispatch_to_responder(), TEST(), and test_lock_event().

## ◆ G_DECLARE_INTERFACE()

G_DECLARE_INTERFACE | ( | FlKeyResponder | ,
|  | fl_key_responder | ,
|  | FL | ,
|  | KEY_RESPONDER | ,
|  | GObject |
| ) |  |

## Variable Documentation

## ◆ FlKeyResponderAsyncCallback

G_BEGIN_DECLS typedef void(* FlKeyResponderAsyncCallback) (bool handled, gpointer user_data)

FlKeyResponderAsyncCallback: @event: whether the event has been handled. @user_data: the same value as user_data sent by fl_key_responder_handle_event.

The signature for a callback with which a #FlKeyResponder asynchronously reports whether the responder handles the event.

Definition at line 26 of file fl_key_responder.h.

event
FlKeyEvent * event
Definition: fl_key_channel_responder.cc:118
user_data
FlKeyEvent uint64_t FlKeyResponderAsyncCallback gpointer user_data
Definition: fl_key_channel_responder.cc:121
specified_logical_key
FlKeyEvent uint64_t specified_logical_key
Definition: fl_key_channel_responder.cc:119
callback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Definition: fl_key_channel_responder.cc:120