Skip to main content

gtk4/auto/
emoji_chooser.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#[cfg(feature = "v4_10")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
7use crate::Accessible;
8use crate::{
9    AccessibleRole, Align, Buildable, ConstraintTarget, LayoutManager, Native, Overflow, Popover,
10    PositionType, ShortcutManager, Widget, ffi,
11};
12use glib::{
13    object::ObjectType as _,
14    prelude::*,
15    signal::{SignalHandlerId, connect_raw},
16    translate::*,
17};
18use std::boxed::Box as Box_;
19
20#[cfg(feature = "v4_10")]
21#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
22glib::wrapper! {
23    /// Used by text widgets to let users insert Emoji characters.
24    ///
25    /// <picture>
26    ///   <source srcset="emojichooser-dark.png" media="(prefers-color-scheme: dark)">
27    ///   <img alt="An example GtkEmojiChooser" src="emojichooser.png">
28    /// </picture>
29    ///
30    /// [`EmojiChooser`][crate::EmojiChooser] emits the [`emoji-picked`][struct@crate::EmojiChooser#emoji-picked]
31    /// signal when an Emoji is selected.
32    ///
33    /// # Shortcuts and Gestures
34    ///
35    /// [`EmojiChooser`][crate::EmojiChooser] supports the following keyboard shortcuts:
36    ///
37    /// - <kbd>Ctrl</kbd>+<kbd>N</kbd> scrolls to the next section.
38    /// - <kbd>Ctrl</kbd>+<kbd>P</kbd> scrolls to the previous section.
39    /// - <kbd>Enter</kbd> to select the first emoji result.
40    ///
41    /// # Actions
42    ///
43    /// [`EmojiChooser`][crate::EmojiChooser] defines a set of built-in actions:
44    ///
45    /// - `scroll.section` scrolls to the next or previous section.
46    ///
47    /// # CSS nodes
48    ///
49    /// ```text
50    /// popover
51    /// ├── box.emoji-searchbar
52    /// │   ╰── entry.search
53    /// ╰── box.emoji-toolbar
54    ///     ├── button.image-button.emoji-section
55    ///     ├── ...
56    ///     ╰── button.image-button.emoji-section
57    /// ```
58    ///
59    /// Every [`EmojiChooser`][crate::EmojiChooser] consists of a main node called popover.
60    /// The contents of the popover are largely implementation defined
61    /// and supposed to inherit general styles.
62    /// The top searchbar used to search emoji and gets the .emoji-searchbar
63    /// style class itself.
64    /// The bottom toolbar used to switch between different emoji categories
65    /// consists of buttons with the .emoji-section style class and gets the
66    /// .emoji-toolbar style class itself.
67    ///
68    /// ## Signals
69    ///
70    ///
71    /// #### `emoji-picked`
72    ///  Emitted when the user selects an Emoji.
73    ///
74    ///
75    /// <details><summary><h4>Popover</h4></summary>
76    ///
77    ///
78    /// #### `activate-default`
79    ///  Emitted whend the user activates the default widget.
80    ///
81    /// This is a [keybinding signal](class.SignalAction.html).
82    ///
83    /// The default binding for this signal is <kbd>Enter</kbd>.
84    ///
85    /// Action
86    ///
87    ///
88    /// #### `closed`
89    ///  Emitted when the popover is closed.
90    ///
91    ///
92    /// </details>
93    /// <details><summary><h4>Widget</h4></summary>
94    ///
95    ///
96    /// #### `destroy`
97    ///  Signals that all holders of a reference to the widget should release
98    /// the reference that they hold.
99    ///
100    /// May result in finalization of the widget if all references are released.
101    ///
102    /// This signal is not suitable for saving widget state.
103    ///
104    ///
105    ///
106    ///
107    /// #### `direction-changed`
108    ///  Emitted when the text direction of a widget changes.
109    ///
110    ///
111    ///
112    ///
113    /// #### `hide`
114    ///  Emitted when @widget is hidden.
115    ///
116    ///
117    ///
118    ///
119    /// #### `keynav-failed`
120    ///  Emitted if keyboard navigation fails.
121    ///
122    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
123    ///
124    ///
125    ///
126    ///
127    /// #### `map`
128    ///  Emitted when @widget is going to be mapped.
129    ///
130    /// A widget is mapped when the widget is visible (which is controlled with
131    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
132    /// are also visible.
133    ///
134    /// The `::map` signal can be used to determine whether a widget will be drawn,
135    /// for instance it can resume an animation that was stopped during the
136    /// emission of [`unmap`][struct@crate::Widget#unmap].
137    ///
138    ///
139    ///
140    ///
141    /// #### `mnemonic-activate`
142    ///  Emitted when a widget is activated via a mnemonic.
143    ///
144    /// The default handler for this signal activates @widget if @group_cycling
145    /// is false, or just makes @widget grab focus if @group_cycling is true.
146    ///
147    ///
148    ///
149    ///
150    /// #### `move-focus`
151    ///  Emitted when the focus is moved.
152    ///
153    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
154    ///
155    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
156    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
157    ///
158    /// Action
159    ///
160    ///
161    /// #### `query-tooltip`
162    ///  Emitted when the widget’s tooltip is about to be shown.
163    ///
164    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
165    /// is true and the hover timeout has expired with the cursor hovering
166    /// above @widget; or emitted when @widget got focus in keyboard mode.
167    ///
168    /// Using the given coordinates, the signal handler should determine
169    /// whether a tooltip should be shown for @widget. If this is the case
170    /// true should be returned, false otherwise. Note that if @keyboard_mode
171    /// is true, the values of @x and @y are undefined and should not be used.
172    ///
173    /// The signal handler is free to manipulate @tooltip with the therefore
174    /// destined function calls.
175    ///
176    ///
177    ///
178    ///
179    /// #### `realize`
180    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
181    ///
182    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
183    /// or the widget has been mapped (that is, it is going to be drawn).
184    ///
185    ///
186    ///
187    ///
188    /// #### `show`
189    ///  Emitted when @widget is shown.
190    ///
191    ///
192    ///
193    ///
194    /// #### `state-flags-changed`
195    ///  Emitted when the widget state changes.
196    ///
197    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
198    ///
199    ///
200    ///
201    ///
202    /// #### `unmap`
203    ///  Emitted when @widget is going to be unmapped.
204    ///
205    /// A widget is unmapped when either it or any of its parents up to the
206    /// toplevel widget have been set as hidden.
207    ///
208    /// As `::unmap` indicates that a widget will not be shown any longer,
209    /// it can be used to, for example, stop an animation on the widget.
210    ///
211    ///
212    ///
213    ///
214    /// #### `unrealize`
215    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
216    ///
217    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
218    /// or the widget has been unmapped (that is, it is going to be hidden).
219    ///
220    ///
221    /// </details>
222    ///
223    /// # Implements
224    ///
225    /// [`PopoverExt`][trait@crate::prelude::PopoverExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`NativeExt`][trait@crate::prelude::NativeExt], [`ShortcutManagerExt`][trait@crate::prelude::ShortcutManagerExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
226    #[doc(alias = "GtkEmojiChooser")]
227    pub struct EmojiChooser(Object<ffi::GtkEmojiChooser, ffi::GtkEmojiChooserClass>) @extends Popover, Widget, @implements Accessible, Buildable, ConstraintTarget, Native, ShortcutManager;
228
229    match fn {
230        type_ => || ffi::gtk_emoji_chooser_get_type(),
231    }
232}
233
234#[cfg(not(feature = "v4_10"))]
235glib::wrapper! {
236    #[doc(alias = "GtkEmojiChooser")]
237    pub struct EmojiChooser(Object<ffi::GtkEmojiChooser, ffi::GtkEmojiChooserClass>) @extends Popover, Widget, @implements Buildable, ConstraintTarget, Native, ShortcutManager;
238
239    match fn {
240        type_ => || ffi::gtk_emoji_chooser_get_type(),
241    }
242}
243
244impl EmojiChooser {
245    /// Creates a new [`EmojiChooser`][crate::EmojiChooser].
246    ///
247    /// # Returns
248    ///
249    /// a new [`EmojiChooser`][crate::EmojiChooser]
250    #[doc(alias = "gtk_emoji_chooser_new")]
251    pub fn new() -> EmojiChooser {
252        assert_initialized_main_thread!();
253        unsafe { Widget::from_glib_none(ffi::gtk_emoji_chooser_new()).unsafe_cast() }
254    }
255
256    // rustdoc-stripper-ignore-next
257    /// Creates a new builder-pattern struct instance to construct [`EmojiChooser`] objects.
258    ///
259    /// This method returns an instance of [`EmojiChooserBuilder`](crate::builders::EmojiChooserBuilder) which can be used to create [`EmojiChooser`] objects.
260    pub fn builder() -> EmojiChooserBuilder {
261        EmojiChooserBuilder::new()
262    }
263
264    /// Emitted when the user selects an Emoji.
265    /// ## `text`
266    /// the Unicode sequence for the picked Emoji, in UTF-8
267    #[doc(alias = "emoji-picked")]
268    pub fn connect_emoji_picked<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
269        unsafe extern "C" fn emoji_picked_trampoline<F: Fn(&EmojiChooser, &str) + 'static>(
270            this: *mut ffi::GtkEmojiChooser,
271            text: *mut std::ffi::c_char,
272            f: glib::ffi::gpointer,
273        ) {
274            unsafe {
275                let f: &F = &*(f as *const F);
276                f(
277                    &from_glib_borrow(this),
278                    &glib::GString::from_glib_borrow(text),
279                )
280            }
281        }
282        unsafe {
283            let f: Box_<F> = Box_::new(f);
284            connect_raw(
285                self.as_ptr() as *mut _,
286                c"emoji-picked".as_ptr(),
287                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
288                    emoji_picked_trampoline::<F> as *const (),
289                )),
290                Box_::into_raw(f),
291            )
292        }
293    }
294}
295
296impl Default for EmojiChooser {
297    fn default() -> Self {
298        Self::new()
299    }
300}
301
302// rustdoc-stripper-ignore-next
303/// A [builder-pattern] type to construct [`EmojiChooser`] objects.
304///
305/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
306#[must_use = "The builder must be built to be used"]
307pub struct EmojiChooserBuilder {
308    builder: glib::object::ObjectBuilder<'static, EmojiChooser>,
309}
310
311impl EmojiChooserBuilder {
312    fn new() -> Self {
313        Self {
314            builder: glib::object::Object::builder(),
315        }
316    }
317
318    /// Whether to dismiss the popover on outside clicks.
319    ///
320    /// If false, the popover won't automatically grab the focus when shown.
321    /// This is useful for usecases like entry completion, where the focus is
322    /// expected to stay on the entry.
323    pub fn autohide(self, autohide: bool) -> Self {
324        Self {
325            builder: self.builder.property("autohide", autohide),
326        }
327    }
328
329    /// Whether the popover pops down after a child popover.
330    ///
331    /// This is used to implement the expected behavior of submenus.
332    pub fn cascade_popdown(self, cascade_popdown: bool) -> Self {
333        Self {
334            builder: self.builder.property("cascade-popdown", cascade_popdown),
335        }
336    }
337
338    /// The child widget.
339    pub fn child(self, child: &impl IsA<Widget>) -> Self {
340        Self {
341            builder: self.builder.property("child", child.clone().upcast()),
342        }
343    }
344
345    /// The default widget inside the popover.
346    pub fn default_widget(self, default_widget: &impl IsA<Widget>) -> Self {
347        Self {
348            builder: self
349                .builder
350                .property("default-widget", default_widget.clone().upcast()),
351        }
352    }
353
354    /// Whether to draw an arrow.
355    pub fn has_arrow(self, has_arrow: bool) -> Self {
356        Self {
357            builder: self.builder.property("has-arrow", has_arrow),
358        }
359    }
360
361    /// Whether mnemonics are currently visible in this popover.
362    pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
363        Self {
364            builder: self
365                .builder
366                .property("mnemonics-visible", mnemonics_visible),
367        }
368    }
369
370    /// Rectangle in the parent widget that the popover points to.
371    pub fn pointing_to(self, pointing_to: &gdk::Rectangle) -> Self {
372        Self {
373            builder: self.builder.property("pointing-to", pointing_to),
374        }
375    }
376
377    /// How to place the popover, relative to its parent.
378    pub fn position(self, position: PositionType) -> Self {
379        Self {
380            builder: self.builder.property("position", position),
381        }
382    }
383
384    /// Whether the widget or any of its descendents can accept
385    /// the input focus.
386    ///
387    /// This property is meant to be set by widget implementations,
388    /// typically in their instance init function.
389    pub fn can_focus(self, can_focus: bool) -> Self {
390        Self {
391            builder: self.builder.property("can-focus", can_focus),
392        }
393    }
394
395    /// Whether the widget can receive pointer events.
396    pub fn can_target(self, can_target: bool) -> Self {
397        Self {
398            builder: self.builder.property("can-target", can_target),
399        }
400    }
401
402    /// A list of css classes applied to this widget.
403    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
404        Self {
405            builder: self.builder.property("css-classes", css_classes.into()),
406        }
407    }
408
409    /// The name of this widget in the CSS tree.
410    ///
411    /// This property is meant to be set by widget implementations,
412    /// typically in their instance init function.
413    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
414        Self {
415            builder: self.builder.property("css-name", css_name.into()),
416        }
417    }
418
419    /// The cursor used by @widget.
420    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
421        Self {
422            builder: self.builder.property("cursor", cursor.clone()),
423        }
424    }
425
426    /// Whether the widget should grab focus when it is clicked with the mouse.
427    ///
428    /// This property is only relevant for widgets that can take focus.
429    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
430        Self {
431            builder: self.builder.property("focus-on-click", focus_on_click),
432        }
433    }
434
435    /// Whether this widget itself will accept the input focus.
436    pub fn focusable(self, focusable: bool) -> Self {
437        Self {
438            builder: self.builder.property("focusable", focusable),
439        }
440    }
441
442    /// How to distribute horizontal space if widget gets extra space.
443    pub fn halign(self, halign: Align) -> Self {
444        Self {
445            builder: self.builder.property("halign", halign),
446        }
447    }
448
449    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
450    /// signal on @widget.
451    ///
452    /// A true value indicates that @widget can have a tooltip, in this case
453    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
454    /// determine whether it will provide a tooltip or not.
455    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
456        Self {
457            builder: self.builder.property("has-tooltip", has_tooltip),
458        }
459    }
460
461    /// Overrides for height request of the widget.
462    ///
463    /// If this is -1, the natural request will be used.
464    pub fn height_request(self, height_request: i32) -> Self {
465        Self {
466            builder: self.builder.property("height-request", height_request),
467        }
468    }
469
470    /// Whether to expand horizontally.
471    pub fn hexpand(self, hexpand: bool) -> Self {
472        Self {
473            builder: self.builder.property("hexpand", hexpand),
474        }
475    }
476
477    /// Whether to use the `hexpand` property.
478    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
479        Self {
480            builder: self.builder.property("hexpand-set", hexpand_set),
481        }
482    }
483
484    /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
485    /// the preferred size of the widget, and allocate its children.
486    ///
487    /// This property is meant to be set by widget implementations,
488    /// typically in their instance init function.
489    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
490        Self {
491            builder: self
492                .builder
493                .property("layout-manager", layout_manager.clone().upcast()),
494        }
495    }
496
497    /// Makes this widget act like a modal dialog, with respect to
498    /// event delivery.
499    ///
500    /// Global event controllers will not handle events with targets
501    /// inside the widget, unless they are set up to ignore propagation
502    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
503    #[cfg(feature = "v4_18")]
504    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
505    pub fn limit_events(self, limit_events: bool) -> Self {
506        Self {
507            builder: self.builder.property("limit-events", limit_events),
508        }
509    }
510
511    /// Margin on bottom side of widget.
512    ///
513    /// This property adds margin outside of the widget's normal size
514    /// request, the margin will be added in addition to the size from
515    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
516    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
517        Self {
518            builder: self.builder.property("margin-bottom", margin_bottom),
519        }
520    }
521
522    /// Margin on end of widget, horizontally.
523    ///
524    /// This property supports left-to-right and right-to-left text
525    /// directions.
526    ///
527    /// This property adds margin outside of the widget's normal size
528    /// request, the margin will be added in addition to the size from
529    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
530    pub fn margin_end(self, margin_end: i32) -> Self {
531        Self {
532            builder: self.builder.property("margin-end", margin_end),
533        }
534    }
535
536    /// Margin on start of widget, horizontally.
537    ///
538    /// This property supports left-to-right and right-to-left text
539    /// directions.
540    ///
541    /// This property adds margin outside of the widget's normal size
542    /// request, the margin will be added in addition to the size from
543    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
544    pub fn margin_start(self, margin_start: i32) -> Self {
545        Self {
546            builder: self.builder.property("margin-start", margin_start),
547        }
548    }
549
550    /// Margin on top side of widget.
551    ///
552    /// This property adds margin outside of the widget's normal size
553    /// request, the margin will be added in addition to the size from
554    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
555    pub fn margin_top(self, margin_top: i32) -> Self {
556        Self {
557            builder: self.builder.property("margin-top", margin_top),
558        }
559    }
560
561    /// The name of the widget.
562    pub fn name(self, name: impl Into<glib::GString>) -> Self {
563        Self {
564            builder: self.builder.property("name", name.into()),
565        }
566    }
567
568    /// The requested opacity of the widget.
569    pub fn opacity(self, opacity: f64) -> Self {
570        Self {
571            builder: self.builder.property("opacity", opacity),
572        }
573    }
574
575    /// How content outside the widget's content area is treated.
576    ///
577    /// This property is meant to be set by widget implementations,
578    /// typically in their instance init function.
579    pub fn overflow(self, overflow: Overflow) -> Self {
580        Self {
581            builder: self.builder.property("overflow", overflow),
582        }
583    }
584
585    /// Whether the widget will receive the default action when it is focused.
586    pub fn receives_default(self, receives_default: bool) -> Self {
587        Self {
588            builder: self.builder.property("receives-default", receives_default),
589        }
590    }
591
592    /// Whether the widget responds to input.
593    pub fn sensitive(self, sensitive: bool) -> Self {
594        Self {
595            builder: self.builder.property("sensitive", sensitive),
596        }
597    }
598
599    /// Sets the text of tooltip to be the given string, which is marked up
600    /// with Pango markup.
601    ///
602    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
603    ///
604    /// This is a convenience property which will take care of getting the
605    /// tooltip shown if the given string is not `NULL`:
606    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
607    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
608    /// the default signal handler.
609    ///
610    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
611    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
612    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
613        Self {
614            builder: self
615                .builder
616                .property("tooltip-markup", tooltip_markup.into()),
617        }
618    }
619
620    /// Sets the text of tooltip to be the given string.
621    ///
622    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
623    ///
624    /// This is a convenience property which will take care of getting the
625    /// tooltip shown if the given string is not `NULL`:
626    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
627    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
628    /// the default signal handler.
629    ///
630    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
631    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
632    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
633        Self {
634            builder: self.builder.property("tooltip-text", tooltip_text.into()),
635        }
636    }
637
638    /// How to distribute vertical space if widget gets extra space.
639    pub fn valign(self, valign: Align) -> Self {
640        Self {
641            builder: self.builder.property("valign", valign),
642        }
643    }
644
645    /// Whether to expand vertically.
646    pub fn vexpand(self, vexpand: bool) -> Self {
647        Self {
648            builder: self.builder.property("vexpand", vexpand),
649        }
650    }
651
652    /// Whether to use the `vexpand` property.
653    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
654        Self {
655            builder: self.builder.property("vexpand-set", vexpand_set),
656        }
657    }
658
659    /// Whether the widget is visible.
660    pub fn visible(self, visible: bool) -> Self {
661        Self {
662            builder: self.builder.property("visible", visible),
663        }
664    }
665
666    /// Overrides for width request of the widget.
667    ///
668    /// If this is -1, the natural request will be used.
669    pub fn width_request(self, width_request: i32) -> Self {
670        Self {
671            builder: self.builder.property("width-request", width_request),
672        }
673    }
674
675    /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
676    ///
677    /// The accessible role cannot be changed once set.
678    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
679        Self {
680            builder: self.builder.property("accessible-role", accessible_role),
681        }
682    }
683
684    // rustdoc-stripper-ignore-next
685    /// Build the [`EmojiChooser`].
686    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
687    pub fn build(self) -> EmojiChooser {
688        assert_initialized_main_thread!();
689        self.builder.build()
690    }
691}