Go to the source code of this file.
◆ fl_mock_keyboard_handler_delegate_class_init()
static void fl_mock_keyboard_handler_delegate_class_init |
( |
FlMockKeyboardHandlerDelegateClass * |
klass | ) |
|
|
static |
◆ fl_mock_keyboard_handler_delegate_keyboard_view_delegate_iface_init()
static void fl_mock_keyboard_handler_delegate_keyboard_view_delegate_iface_init |
( |
FlKeyboardViewDelegateInterface * |
iface | ) |
|
|
static |
◆ fl_mock_keyboard_handler_delegate_new()
static FlMockKeyboardHandlerDelegate* fl_mock_keyboard_handler_delegate_new |
( |
| ) |
|
|
static |
Definition at line 54 of file fl_keyboard_handler_test.cc.
55 FlMockKeyboardHandlerDelegate*
self = FL_MOCK_KEYBOARD_HANDLER_DELEGATE(
56 g_object_new(fl_mock_keyboard_handler_delegate_get_type(),
nullptr));
59 FL_IS_MOCK_KEYBOARD_HANDLER_DELEGATE(
self);
Referenced by TEST().
◆ G_DECLARE_FINAL_TYPE()
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE |
( |
FlMockKeyboardHandlerDelegate |
, |
|
|
fl_mock_keyboard_handler_delegate |
, |
|
|
FL |
, |
|
|
MOCK_KEYBOARD_HANDLER_DELEGATE |
, |
|
|
GObject |
|
|
) |
| |
◆ G_DEFINE_TYPE_WITH_CODE()
◆ TEST()
TEST |
( |
FlKeyboardHandlerTest |
, |
|
|
KeyboardChannelGetPressedState |
|
|
) |
| |
Definition at line 64 of file fl_keyboard_handler_test.cc.
65 g_autoptr(FlMockBinaryMessenger) messenger = fl_mock_binary_messenger_new();
66 g_autoptr(FlEngine) engine =
67 FL_ENGINE(g_object_new(fl_engine_get_type(),
"binary-messenger",
68 FL_BINARY_MESSENGER(messenger),
nullptr));
69 g_autoptr(FlMockKeyboardHandlerDelegate) view_delegate =
71 g_autoptr(FlKeyboardManager) manager =
76 GHashTable* result = g_hash_table_new(g_direct_hash, g_direct_equal);
77 g_hash_table_insert(result,
84 g_autoptr(FlKeyboardHandler) handler =
86 EXPECT_NE(handler,
nullptr);
88 gboolean called = FALSE;
89 fl_mock_binary_messenger_invoke_standard_method(
91 [](FlMockBinaryMessenger* messenger, FlMethodResponse* response,
93 gboolean* called =
static_cast<gboolean*
>(
user_data);
96 EXPECT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response));
102 FL_METHOD_SUCCESS_RESPONSE(response)),
References fl_binary_messenger_shutdown(), fl_keyboard_handler_new(), fl_keyboard_manager_new(), fl_keyboard_manager_set_get_pressed_state_handler(), fl_method_success_response_get_result(), fl_mock_keyboard_handler_delegate_new(), fl_value_equal(), fl_value_new_int(), fl_value_new_map(), fl_value_set_take(), kGetKeyboardStateMethod, kKeyboardChannelName, kMockLogicalKey, kMockPhysicalKey, TRUE, and user_data.
◆ kGetKeyboardStateMethod
constexpr char kGetKeyboardStateMethod[] = "getKeyboardState" |
|
staticconstexpr |
◆ kKeyboardChannelName
constexpr char kKeyboardChannelName[] = "flutter/keyboard" |
|
staticconstexpr |
◆ kMockLogicalKey
constexpr uint64_t kMockLogicalKey = 42 |
|
staticconstexpr |
◆ kMockPhysicalKey
constexpr uint64_t kMockPhysicalKey = 42 |
|
staticconstexpr |