gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.EmojiChooser

Contents

- Exported types
- Methods
  - new
- Signals
  - emojiPicked

Description

Used by text widgets to let users insert Emoji characters.

<picture> <source srcset="emojichooser-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkEmojiChooser" src="emojichooser.png"> </picture>

`GtkEmojiChooser` emits the EmojiChooser::emojiPicked signal when an Emoji is selected.

# Shortcuts and Gestures

`GtkEmojiChooser` supports the following keyboard shortcuts:

- <kbd>Ctrl</kbd>+<kbd>N</kbd> scrolls th the next section.
- <kbd>Ctrl</kbd>+<kbd>P</kbd> scrolls th the previous section.

# Actions

`GtkEmojiChooser` defines a set of built-in actions:

- `scroll.section` scrolls to the next or previous section.

# 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.

Synopsis

- newtype EmojiChooser = EmojiChooser (ManagedPtr EmojiChooser)
- class (GObject o, IsDescendantOf EmojiChooser o) => IsEmojiChooser o
- toEmojiChooser :: (MonadIO m, IsEmojiChooser o) => o -> m EmojiChooser
- emojiChooserNew :: (HasCallStack, MonadIO m) => m EmojiChooser
- type EmojiChooserEmojiPickedCallback = Text -> IO ()
- afterEmojiChooserEmojiPicked :: (IsEmojiChooser a, MonadIO m) => a -> ((?self :: a) => EmojiChooserEmojiPickedCallback) -> m SignalHandlerId
- onEmojiChooserEmojiPicked :: (IsEmojiChooser a, MonadIO m) => a -> ((?self :: a) => EmojiChooserEmojiPickedCallback) -> m SignalHandlerId

# Exported types

newtype EmojiChooser Source #

Memory-managed wrapper type.

Constructors

EmojiChooser (ManagedPtr EmojiChooser) |

#### Instances

Instances details

Eq EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser Methods (==) :: EmojiChooser -> EmojiChooser -> Bool Source # (/=) :: EmojiChooser -> EmojiChooser -> Bool Source #
GObject EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser
ManagedPtrNewtype EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser Methods toManagedPtr :: EmojiChooser -> ManagedPtr EmojiChooser Source #
TypedObject EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser Methods glibType :: IO GType Source #
HasParentTypes EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser
IsGValue (Maybe EmojiChooser) Source # | Convert `EmojiChooser` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.EmojiChooser Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe EmojiChooser -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe EmojiChooser) Source #
type ParentTypes EmojiChooser Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser type ParentTypes EmojiChooser = '[Popover, Widget, Object, Accessible, Buildable, ConstraintTarget, Native, ShortcutManager]

class (GObject o, IsDescendantOf EmojiChooser o) => IsEmojiChooser o Source #

Type class for types which can be safely cast to `EmojiChooser`, for instance with `toEmojiChooser`.

#### Instances

Instances details

(GObject o, IsDescendantOf EmojiChooser o) => IsEmojiChooser o Source # |
Instance details Defined in GI.Gtk.Objects.EmojiChooser

toEmojiChooser :: (MonadIO m, IsEmojiChooser o) => o -> m EmojiChooser Source #

Cast to `EmojiChooser`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, popdown, popup, present, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAutohide, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getCascadePopdown, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasArrow, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getName, getNative, getNextAccessibleSibling, getNextSibling, getOffset, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPointingTo, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSurface, getSurfaceTransform, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setAutohide, setCanFocus, setCanTarget, setCascadePopdown, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDefaultWidget, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasArrow, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setName, setOffset, setOpacity, setOverflow, setParent, setPointingTo, setPosition, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## new

emojiChooserNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m EmojiChooser | Returns: a new `GtkEmojiChooser`

Creates a new `GtkEmojiChooser`.

# Signals

## emojiPicked

type EmojiChooserEmojiPickedCallback Source #

Arguments

= Text | `text`: the Unicode sequence for the picked Emoji, in UTF-8
-> IO () |

Emitted when the user selects an Emoji.

afterEmojiChooserEmojiPicked :: (IsEmojiChooser a, MonadIO m) => a -> ((?self :: a) => EmojiChooserEmojiPickedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the emojiPicked signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after emojiChooser #emojiPicked callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onEmojiChooserEmojiPicked :: (IsEmojiChooser a, MonadIO m) => a -> ((?self :: a) => EmojiChooserEmojiPickedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the emojiPicked signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on emojiChooser #emojiPicked callback