GtkEmojiChooser

GtkEmojiChooser — A popover to choose an Emoji character

Signals

void emoji-picked Run Last

Actions

scroll.section i

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkPopover
                ╰── GtkEmojiChooser

Implemented Interfaces

GtkEmojiChooser implements GtkAccessible, GtkBuildable, GtkConstraintTarget, GtkShortcutManager and GtkNative.

Includes

#include <gtk/gtk.h>

Description

The GtkEmojiChooser popover is used by text widgets such as GtkEntry or GtkTextView to offer users a convenient way to insert Emoji characters.

GtkEmojiChooser emits the “emoji-picked” signal when an Emoji is selected.

CSS nodes

popover
├── box.emoji-searchbar
│   ╰── entry.search
╰── box.emoji-toolbar
    ├── button.image-button.emoji-section
    ├── ...
    ╰── button.image-button.emoji-section

Every GtkEmojiChooser consists of a main node called popover. The contents of the popover are largely implementation defined and supposed to inherit general styles. The top searchbar used to search emoji and gets the .emoji-searchbar style class itself. The bottom toolbar used to switch between different emoji categories consists of buttons with the .emoji-section style class and gets the .emoji-toolbar style class itself.

Functions

gtk_emoji_chooser_new ()

GtkWidget *
gtk_emoji_chooser_new (void);

Creates a new GtkEmojiChooser.

Returns

a new GtkEmojiChooser

Types and Values

GtkEmojiChooser

typedef struct _GtkEmojiChooser GtkEmojiChooser;

Signal Details

The “emoji-picked” signal

void
user_function (GtkEmojiChooser *chooser,
               char            *text,
               gpointer         user_data)

The ::emoji-picked signal is emitted when the user selects an Emoji.

Parameters

chooser

the GtkEmojiChooser

text

the Unicode sequence for the picked Emoji, in UTF-8

user_data

user data set when the signal handler was connected.

Flags: Run Last

Action Details

The “scroll.section” action

Scrolls to the next or previous section.

Parameter type: i

Parameters

direction

1 to scroll forward, -1 to scroll back

© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkEmojiChooser.html