Skip to main content

gtk4/auto/
cell_editable.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#![allow(deprecated)]
5
6#[cfg(feature = "v4_10")]
7#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
8use crate::Accessible;
9use crate::{Buildable, ConstraintTarget, Widget, ffi};
10use glib::{
11    object::ObjectType as _,
12    prelude::*,
13    signal::{SignalHandlerId, connect_raw},
14    translate::*,
15};
16use std::boxed::Box as Box_;
17
18#[cfg(feature = "v4_10")]
19#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
20glib::wrapper! {
21    /// List views use widgets for displaying their
22    ///   contents. See [`Editable`][crate::Editable] for editable text widgets
23    /// Interface for widgets that can be used for editing cells
24    ///
25    /// The [`CellEditable`][crate::CellEditable] interface must be implemented for widgets to be usable
26    /// to edit the contents of a [`TreeView`][crate::TreeView] cell. It provides a way to specify how
27    /// temporary widgets should be configured for editing, get the new value, etc.
28    ///
29    /// ## Properties
30    ///
31    ///
32    /// #### `editing-canceled`
33    ///  Indicates whether editing on the cell has been canceled.
34    ///
35    /// Readable | Writable
36    /// <details><summary><h4>Widget</h4></summary>
37    ///
38    ///
39    /// #### `can-focus`
40    ///  Whether the widget or any of its descendents can accept
41    /// the input focus.
42    ///
43    /// This property is meant to be set by widget implementations,
44    /// typically in their instance init function.
45    ///
46    /// Readable | Writable
47    ///
48    ///
49    /// #### `can-target`
50    ///  Whether the widget can receive pointer events.
51    ///
52    /// Readable | Writable
53    ///
54    ///
55    /// #### `css-classes`
56    ///  A list of css classes applied to this widget.
57    ///
58    /// Readable | Writable
59    ///
60    ///
61    /// #### `css-name`
62    ///  The name of this widget in the CSS tree.
63    ///
64    /// This property is meant to be set by widget implementations,
65    /// typically in their instance init function.
66    ///
67    /// Readable | Writable | Construct Only
68    ///
69    ///
70    /// #### `cursor`
71    ///  The cursor used by @widget.
72    ///
73    /// Readable | Writable
74    ///
75    ///
76    /// #### `focus-on-click`
77    ///  Whether the widget should grab focus when it is clicked with the mouse.
78    ///
79    /// This property is only relevant for widgets that can take focus.
80    ///
81    /// Readable | Writable
82    ///
83    ///
84    /// #### `focusable`
85    ///  Whether this widget itself will accept the input focus.
86    ///
87    /// Readable | Writable
88    ///
89    ///
90    /// #### `halign`
91    ///  How to distribute horizontal space if widget gets extra space.
92    ///
93    /// Readable | Writable
94    ///
95    ///
96    /// #### `has-default`
97    ///  Whether the widget is the default widget.
98    ///
99    /// Readable
100    ///
101    ///
102    /// #### `has-focus`
103    ///  Whether the widget has the input focus.
104    ///
105    /// Readable
106    ///
107    ///
108    /// #### `has-tooltip`
109    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
110    /// signal on @widget.
111    ///
112    /// A true value indicates that @widget can have a tooltip, in this case
113    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
114    /// determine whether it will provide a tooltip or not.
115    ///
116    /// Readable | Writable
117    ///
118    ///
119    /// #### `height-request`
120    ///  Overrides for height request of the widget.
121    ///
122    /// If this is -1, the natural request will be used.
123    ///
124    /// Readable | Writable
125    ///
126    ///
127    /// #### `hexpand`
128    ///  Whether to expand horizontally.
129    ///
130    /// Readable | Writable
131    ///
132    ///
133    /// #### `hexpand-set`
134    ///  Whether to use the `hexpand` property.
135    ///
136    /// Readable | Writable
137    ///
138    ///
139    /// #### `layout-manager`
140    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
141    /// the preferred size of the widget, and allocate its children.
142    ///
143    /// This property is meant to be set by widget implementations,
144    /// typically in their instance init function.
145    ///
146    /// Readable | Writable
147    ///
148    ///
149    /// #### `limit-events`
150    ///  Makes this widget act like a modal dialog, with respect to
151    /// event delivery.
152    ///
153    /// Global event controllers will not handle events with targets
154    /// inside the widget, unless they are set up to ignore propagation
155    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
156    ///
157    /// Readable | Writable
158    ///
159    ///
160    /// #### `margin-bottom`
161    ///  Margin on bottom side of widget.
162    ///
163    /// This property adds margin outside of the widget's normal size
164    /// request, the margin will be added in addition to the size from
165    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
166    ///
167    /// Readable | Writable
168    ///
169    ///
170    /// #### `margin-end`
171    ///  Margin on end of widget, horizontally.
172    ///
173    /// This property supports left-to-right and right-to-left text
174    /// directions.
175    ///
176    /// This property adds margin outside of the widget's normal size
177    /// request, the margin will be added in addition to the size from
178    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
179    ///
180    /// Readable | Writable
181    ///
182    ///
183    /// #### `margin-start`
184    ///  Margin on start of widget, horizontally.
185    ///
186    /// This property supports left-to-right and right-to-left text
187    /// directions.
188    ///
189    /// This property adds margin outside of the widget's normal size
190    /// request, the margin will be added in addition to the size from
191    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
192    ///
193    /// Readable | Writable
194    ///
195    ///
196    /// #### `margin-top`
197    ///  Margin on top side of widget.
198    ///
199    /// This property adds margin outside of the widget's normal size
200    /// request, the margin will be added in addition to the size from
201    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
202    ///
203    /// Readable | Writable
204    ///
205    ///
206    /// #### `name`
207    ///  The name of the widget.
208    ///
209    /// Readable | Writable
210    ///
211    ///
212    /// #### `opacity`
213    ///  The requested opacity of the widget.
214    ///
215    /// Readable | Writable
216    ///
217    ///
218    /// #### `overflow`
219    ///  How content outside the widget's content area is treated.
220    ///
221    /// This property is meant to be set by widget implementations,
222    /// typically in their instance init function.
223    ///
224    /// Readable | Writable
225    ///
226    ///
227    /// #### `parent`
228    ///  The parent widget of this widget.
229    ///
230    /// Readable
231    ///
232    ///
233    /// #### `receives-default`
234    ///  Whether the widget will receive the default action when it is focused.
235    ///
236    /// Readable | Writable
237    ///
238    ///
239    /// #### `root`
240    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
241    ///
242    /// This will be `NULL` if the widget is not contained in a root widget.
243    ///
244    /// Readable
245    ///
246    ///
247    /// #### `scale-factor`
248    ///  The scale factor of the widget.
249    ///
250    /// Readable
251    ///
252    ///
253    /// #### `sensitive`
254    ///  Whether the widget responds to input.
255    ///
256    /// Readable | Writable
257    ///
258    ///
259    /// #### `tooltip-markup`
260    ///  Sets the text of tooltip to be the given string, which is marked up
261    /// with Pango markup.
262    ///
263    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
264    ///
265    /// This is a convenience property which will take care of getting the
266    /// tooltip shown if the given string is not `NULL`:
267    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
268    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
269    /// the default signal handler.
270    ///
271    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
272    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
273    ///
274    /// Readable | Writable
275    ///
276    ///
277    /// #### `tooltip-text`
278    ///  Sets the text of tooltip to be the given string.
279    ///
280    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
281    ///
282    /// This is a convenience property which will take care of getting the
283    /// tooltip shown if the given string is not `NULL`:
284    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
285    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
286    /// the default signal handler.
287    ///
288    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
289    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
290    ///
291    /// Readable | Writable
292    ///
293    ///
294    /// #### `valign`
295    ///  How to distribute vertical space if widget gets extra space.
296    ///
297    /// Readable | Writable
298    ///
299    ///
300    /// #### `vexpand`
301    ///  Whether to expand vertically.
302    ///
303    /// Readable | Writable
304    ///
305    ///
306    /// #### `vexpand-set`
307    ///  Whether to use the `vexpand` property.
308    ///
309    /// Readable | Writable
310    ///
311    ///
312    /// #### `visible`
313    ///  Whether the widget is visible.
314    ///
315    /// Readable | Writable
316    ///
317    ///
318    /// #### `width-request`
319    ///  Overrides for width request of the widget.
320    ///
321    /// If this is -1, the natural request will be used.
322    ///
323    /// Readable | Writable
324    /// </details>
325    /// <details><summary><h4>Accessible</h4></summary>
326    ///
327    ///
328    /// #### `accessible-role`
329    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
330    ///
331    /// The accessible role cannot be changed once set.
332    ///
333    /// Readable | Writable
334    /// </details>
335    ///
336    /// ## Signals
337    ///
338    ///
339    /// #### `editing-done`
340    ///  This signal is a sign for the cell renderer to update its
341    /// value from the @cell_editable.
342    ///
343    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
344    /// emitting this signal when they are done editing, e.g.
345    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
346    /// do in a handler for ::editing-done are to capture the edited value,
347    /// disconnect the @cell_editable from signals on the [`CellRenderer`][crate::CellRenderer], etc.
348    ///
349    /// gtk_cell_editable_editing_done() is a convenience method
350    /// for emitting `GtkCellEditable::editing-done`.
351    ///
352    ///
353    ///
354    ///
355    /// #### `remove-widget`
356    ///  This signal is meant to indicate that the cell is finished
357    /// editing, and the @cell_editable widget is being removed and may
358    /// subsequently be destroyed.
359    ///
360    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
361    /// emitting this signal when they are done editing. It must
362    /// be emitted after the `GtkCellEditable::editing-done` signal,
363    /// to give the cell renderer a chance to update the cell's value
364    /// before the widget is removed.
365    ///
366    /// gtk_cell_editable_remove_widget() is a convenience method
367    /// for emitting `GtkCellEditable::remove-widget`.
368    ///
369    ///
370    /// <details><summary><h4>Widget</h4></summary>
371    ///
372    ///
373    /// #### `destroy`
374    ///  Signals that all holders of a reference to the widget should release
375    /// the reference that they hold.
376    ///
377    /// May result in finalization of the widget if all references are released.
378    ///
379    /// This signal is not suitable for saving widget state.
380    ///
381    ///
382    ///
383    ///
384    /// #### `direction-changed`
385    ///  Emitted when the text direction of a widget changes.
386    ///
387    ///
388    ///
389    ///
390    /// #### `hide`
391    ///  Emitted when @widget is hidden.
392    ///
393    ///
394    ///
395    ///
396    /// #### `keynav-failed`
397    ///  Emitted if keyboard navigation fails.
398    ///
399    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
400    ///
401    ///
402    ///
403    ///
404    /// #### `map`
405    ///  Emitted when @widget is going to be mapped.
406    ///
407    /// A widget is mapped when the widget is visible (which is controlled with
408    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
409    /// are also visible.
410    ///
411    /// The `::map` signal can be used to determine whether a widget will be drawn,
412    /// for instance it can resume an animation that was stopped during the
413    /// emission of [`unmap`][struct@crate::Widget#unmap].
414    ///
415    ///
416    ///
417    ///
418    /// #### `mnemonic-activate`
419    ///  Emitted when a widget is activated via a mnemonic.
420    ///
421    /// The default handler for this signal activates @widget if @group_cycling
422    /// is false, or just makes @widget grab focus if @group_cycling is true.
423    ///
424    ///
425    ///
426    ///
427    /// #### `move-focus`
428    ///  Emitted when the focus is moved.
429    ///
430    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
431    ///
432    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
433    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
434    ///
435    /// Action
436    ///
437    ///
438    /// #### `query-tooltip`
439    ///  Emitted when the widget’s tooltip is about to be shown.
440    ///
441    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
442    /// is true and the hover timeout has expired with the cursor hovering
443    /// above @widget; or emitted when @widget got focus in keyboard mode.
444    ///
445    /// Using the given coordinates, the signal handler should determine
446    /// whether a tooltip should be shown for @widget. If this is the case
447    /// true should be returned, false otherwise. Note that if @keyboard_mode
448    /// is true, the values of @x and @y are undefined and should not be used.
449    ///
450    /// The signal handler is free to manipulate @tooltip with the therefore
451    /// destined function calls.
452    ///
453    ///
454    ///
455    ///
456    /// #### `realize`
457    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
458    ///
459    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
460    /// or the widget has been mapped (that is, it is going to be drawn).
461    ///
462    ///
463    ///
464    ///
465    /// #### `show`
466    ///  Emitted when @widget is shown.
467    ///
468    ///
469    ///
470    ///
471    /// #### `state-flags-changed`
472    ///  Emitted when the widget state changes.
473    ///
474    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
475    ///
476    ///
477    ///
478    ///
479    /// #### `unmap`
480    ///  Emitted when @widget is going to be unmapped.
481    ///
482    /// A widget is unmapped when either it or any of its parents up to the
483    /// toplevel widget have been set as hidden.
484    ///
485    /// As `::unmap` indicates that a widget will not be shown any longer,
486    /// it can be used to, for example, stop an animation on the widget.
487    ///
488    ///
489    ///
490    ///
491    /// #### `unrealize`
492    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
493    ///
494    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
495    /// or the widget has been unmapped (that is, it is going to be hidden).
496    ///
497    ///
498    /// </details>
499    ///
500    /// # Implements
501    ///
502    /// [`CellEditableExt`][trait@crate::prelude::CellEditableExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
503    #[doc(alias = "GtkCellEditable")]
504    pub struct CellEditable(Interface<ffi::GtkCellEditable, ffi::GtkCellEditableIface>) @requires Widget, Accessible, Buildable, ConstraintTarget;
505
506    match fn {
507        type_ => || ffi::gtk_cell_editable_get_type(),
508    }
509}
510
511#[cfg(not(feature = "v4_10"))]
512glib::wrapper! {
513    #[doc(alias = "GtkCellEditable")]
514    pub struct CellEditable(Interface<ffi::GtkCellEditable, ffi::GtkCellEditableIface>) @requires Widget, Buildable, ConstraintTarget;
515
516    match fn {
517        type_ => || ffi::gtk_cell_editable_get_type(),
518    }
519}
520
521impl CellEditable {
522    pub const NONE: Option<&'static CellEditable> = None;
523}
524
525/// Trait containing all [`struct@CellEditable`] methods.
526///
527/// # Implementors
528///
529/// [`CellEditable`][struct@crate::CellEditable], [`ComboBoxText`][struct@crate::ComboBoxText], [`ComboBox`][struct@crate::ComboBox], [`Entry`][struct@crate::Entry], [`SpinButton`][struct@crate::SpinButton]
530pub trait CellEditableExt: IsA<CellEditable> + 'static {
531    /// Emits the `GtkCellEditable::editing-done` signal.
532    ///
533    /// # Deprecated since 4.10
534    ///
535    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
536    #[allow(deprecated)]
537    #[doc(alias = "gtk_cell_editable_editing_done")]
538    fn editing_done(&self) {
539        unsafe {
540            ffi::gtk_cell_editable_editing_done(self.as_ref().to_glib_none().0);
541        }
542    }
543
544    /// Emits the `GtkCellEditable::remove-widget` signal.
545    ///
546    /// # Deprecated since 4.10
547    ///
548    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
549    #[allow(deprecated)]
550    #[doc(alias = "gtk_cell_editable_remove_widget")]
551    fn remove_widget(&self) {
552        unsafe {
553            ffi::gtk_cell_editable_remove_widget(self.as_ref().to_glib_none().0);
554        }
555    }
556
557    /// Begins editing on a @self.
558    ///
559    /// The [`CellRenderer`][crate::CellRenderer] for the cell creates and returns a [`CellEditable`][crate::CellEditable] from
560    /// gtk_cell_renderer_start_editing(), configured for the [`CellRenderer`][crate::CellRenderer] type.
561    ///
562    /// gtk_cell_editable_start_editing() can then set up @self suitably for
563    /// editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
564    ///
565    /// Note that the @self is created on-demand for the current edit; its
566    /// lifetime is temporary and does not persist across other edits and/or cells.
567    ///
568    /// # Deprecated since 4.10
569    ///
570    /// ## `event`
571    /// The [`gdk::Event`][crate::gdk::Event] that began the editing process, or
572    ///   [`None`] if editing was initiated programmatically
573    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
574    #[allow(deprecated)]
575    #[doc(alias = "gtk_cell_editable_start_editing")]
576    fn start_editing(&self, event: Option<impl AsRef<gdk::Event>>) {
577        unsafe {
578            ffi::gtk_cell_editable_start_editing(
579                self.as_ref().to_glib_none().0,
580                event.as_ref().map(|p| p.as_ref()).to_glib_none().0,
581            );
582        }
583    }
584
585    /// Indicates whether editing on the cell has been canceled.
586    #[doc(alias = "editing-canceled")]
587    fn is_editing_canceled(&self) -> bool {
588        ObjectExt::property(self.as_ref(), "editing-canceled")
589    }
590
591    /// Indicates whether editing on the cell has been canceled.
592    #[doc(alias = "editing-canceled")]
593    fn set_editing_canceled(&self, editing_canceled: bool) {
594        ObjectExt::set_property(self.as_ref(), "editing-canceled", editing_canceled)
595    }
596
597    /// This signal is a sign for the cell renderer to update its
598    /// value from the @cell_editable.
599    ///
600    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
601    /// emitting this signal when they are done editing, e.g.
602    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
603    /// do in a handler for ::editing-done are to capture the edited value,
604    /// disconnect the @cell_editable from signals on the [`CellRenderer`][crate::CellRenderer], etc.
605    ///
606    /// gtk_cell_editable_editing_done() is a convenience method
607    /// for emitting `GtkCellEditable::editing-done`.
608    #[doc(alias = "editing-done")]
609    fn connect_editing_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
610        unsafe extern "C" fn editing_done_trampoline<P: IsA<CellEditable>, F: Fn(&P) + 'static>(
611            this: *mut ffi::GtkCellEditable,
612            f: glib::ffi::gpointer,
613        ) {
614            unsafe {
615                let f: &F = &*(f as *const F);
616                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
617            }
618        }
619        unsafe {
620            let f: Box_<F> = Box_::new(f);
621            connect_raw(
622                self.as_ptr() as *mut _,
623                c"editing-done".as_ptr(),
624                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
625                    editing_done_trampoline::<Self, F> as *const (),
626                )),
627                Box_::into_raw(f),
628            )
629        }
630    }
631
632    /// This signal is meant to indicate that the cell is finished
633    /// editing, and the @cell_editable widget is being removed and may
634    /// subsequently be destroyed.
635    ///
636    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
637    /// emitting this signal when they are done editing. It must
638    /// be emitted after the `GtkCellEditable::editing-done` signal,
639    /// to give the cell renderer a chance to update the cell's value
640    /// before the widget is removed.
641    ///
642    /// gtk_cell_editable_remove_widget() is a convenience method
643    /// for emitting `GtkCellEditable::remove-widget`.
644    #[doc(alias = "remove-widget")]
645    fn connect_remove_widget<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
646        unsafe extern "C" fn remove_widget_trampoline<P: IsA<CellEditable>, F: Fn(&P) + 'static>(
647            this: *mut ffi::GtkCellEditable,
648            f: glib::ffi::gpointer,
649        ) {
650            unsafe {
651                let f: &F = &*(f as *const F);
652                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
653            }
654        }
655        unsafe {
656            let f: Box_<F> = Box_::new(f);
657            connect_raw(
658                self.as_ptr() as *mut _,
659                c"remove-widget".as_ptr(),
660                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
661                    remove_widget_trampoline::<Self, F> as *const (),
662                )),
663                Box_::into_raw(f),
664            )
665        }
666    }
667
668    #[doc(alias = "editing-canceled")]
669    fn connect_editing_canceled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
670        unsafe extern "C" fn notify_editing_canceled_trampoline<
671            P: IsA<CellEditable>,
672            F: Fn(&P) + 'static,
673        >(
674            this: *mut ffi::GtkCellEditable,
675            _param_spec: glib::ffi::gpointer,
676            f: glib::ffi::gpointer,
677        ) {
678            unsafe {
679                let f: &F = &*(f as *const F);
680                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
681            }
682        }
683        unsafe {
684            let f: Box_<F> = Box_::new(f);
685            connect_raw(
686                self.as_ptr() as *mut _,
687                c"notify::editing-canceled".as_ptr(),
688                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
689                    notify_editing_canceled_trampoline::<Self, F> as *const (),
690                )),
691                Box_::into_raw(f),
692            )
693        }
694    }
695}
696
697impl<O: IsA<CellEditable>> CellEditableExt for O {}