| Flutter Linux Embedder |

Functions
fl_keyboard_layout_test.cc File Reference
`#include "flutter/shell/platform/linux/fl_keyboard_layout.h"`
`#include "gtest/gtest.h"`

Go to the source code of this file.

## Functions
| TEST (FlKeyboardLayoutTest, SetLogicalKey)
| TEST (FlKeyboardLayoutTest, MaxValues)
| TEST (FlKeyboardLayoutTest, HasGroup)

## Function Documentation

## ◆ TEST() [1/3]

TEST | ( | FlKeyboardLayoutTest | ,
|  | HasGroup |
| ) |  |

Definition at line 33 of file fl_keyboard_layout_test.cc.

33 {
34 g_autoptr(FlKeyboardLayout) layout = fl_keyboard_layout_new();
35
36 EXPECT_FALSE(fl_keyboard_layout_has_group(layout, 42));
37
38 fl_keyboard_layout_set_logical_key(layout, 42, 11, 22);
39
40 EXPECT_TRUE(fl_keyboard_layout_has_group(layout, 42));
41 }
g_autoptr
g_autoptr(GMutexLocker) locker
fl_keyboard_layout_set_logical_key
void fl_keyboard_layout_set_logical_key(FlKeyboardLayout *self, uint8_t group, uint16_t keycode, uint64_t logical_key)
Definition: fl_keyboard_layout.cc:49
fl_keyboard_layout_new
FlKeyboardLayout * fl_keyboard_layout_new()
Definition: fl_keyboard_layout.cc:40
fl_keyboard_layout_has_group
gboolean fl_keyboard_layout_has_group(FlKeyboardLayout *self, uint8_t group)
Definition: fl_keyboard_layout.cc:45

References fl_keyboard_layout_has_group(), fl_keyboard_layout_new(), fl_keyboard_layout_set_logical_key(), and g_autoptr().

## ◆ TEST() [2/3]

TEST | ( | FlKeyboardLayoutTest | ,
|  | MaxValues |
| ) |  |

Definition at line 21 of file fl_keyboard_layout_test.cc.

21 {
22 g_autoptr(FlKeyboardLayout) layout = fl_keyboard_layout_new();
23
24 EXPECT_EQ(fl_keyboard_layout_get_logical_key(layout, 255, 127),
25 static_cast<uint64_t>(0));
26
27 fl_keyboard_layout_set_logical_key(layout, 255, 127, 12345678);
28
29 EXPECT_EQ(fl_keyboard_layout_get_logical_key(layout, 255, 127),
30 static_cast<uint64_t>(12345678));
31 }
fl_keyboard_layout_get_logical_key
uint64_t fl_keyboard_layout_get_logical_key(FlKeyboardLayout *self, uint8_t group, uint16_t keycode)
Definition: fl_keyboard_layout.cc:65

References fl_keyboard_layout_get_logical_key(), fl_keyboard_layout_new(), fl_keyboard_layout_set_logical_key(), and g_autoptr().

## ◆ TEST() [3/3]

TEST | ( | FlKeyboardLayoutTest | ,
|  | SetLogicalKey |
| ) |  |

Definition at line 9 of file fl_keyboard_layout_test.cc.

9 {
10 g_autoptr(FlKeyboardLayout) layout = fl_keyboard_layout_new();
11
12 EXPECT_EQ(fl_keyboard_layout_get_logical_key(layout, 0, 42),
13 static_cast<uint64_t>(0));
14
15 fl_keyboard_layout_set_logical_key(layout, 0, 42, 1234);
16
17 EXPECT_EQ(fl_keyboard_layout_get_logical_key(layout, 0, 42),
18 static_cast<uint64_t>(1234));
19 }

References fl_keyboard_layout_get_logical_key(), fl_keyboard_layout_new(), fl_keyboard_layout_set_logical_key(), and g_autoptr().