gtk4/auto/adjustment.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
5use crate::ffi;
6use glib::{
7 object::ObjectType as _,
8 prelude::*,
9 signal::{SignalHandlerId, connect_raw},
10 translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15 /// A model for a numeric value.
16 ///
17 /// The [`Adjustment`][crate::Adjustment] has an associated lower and upper bound.
18 /// It also contains step and page increments, and a page size.
19 ///
20 /// Adjustments are used within several GTK widgets, including
21 /// [`SpinButton`][crate::SpinButton], [`Viewport`][crate::Viewport], [`Scrollbar`][crate::Scrollbar]
22 /// and [`Scale`][crate::Scale].
23 ///
24 /// The [`Adjustment`][crate::Adjustment] object does not update the value itself. Instead
25 /// it is left up to the owner of the [`Adjustment`][crate::Adjustment] to control the value.
26 ///
27 /// ## Properties
28 ///
29 ///
30 /// #### `lower`
31 /// The minimum value of the adjustment.
32 ///
33 /// Readable | Writeable
34 ///
35 ///
36 /// #### `page-increment`
37 /// The page increment of the adjustment.
38 ///
39 /// Readable | Writeable
40 ///
41 ///
42 /// #### `page-size`
43 /// The page size of the adjustment.
44 ///
45 /// Note that the page-size is irrelevant and should be set to zero
46 /// if the adjustment is used for a simple scalar value, e.g. in a
47 /// [`SpinButton`][crate::SpinButton].
48 ///
49 /// Readable | Writeable
50 ///
51 ///
52 /// #### `step-increment`
53 /// The step increment of the adjustment.
54 ///
55 /// Readable | Writeable
56 ///
57 ///
58 /// #### `upper`
59 /// The maximum value of the adjustment.
60 ///
61 /// Note that values will be restricted by `upper - page-size` if the page-size
62 /// property is nonzero.
63 ///
64 /// Readable | Writeable
65 ///
66 ///
67 /// #### `value`
68 /// The value of the adjustment.
69 ///
70 /// Readable | Writeable
71 ///
72 /// ## Signals
73 ///
74 ///
75 /// #### `changed`
76 /// Emitted when one or more of the [`Adjustment`][crate::Adjustment] properties have been
77 /// changed.
78 ///
79 /// Note that the [`value`][struct@crate::Adjustment#value] property is
80 /// covered by the [`value-changed`][struct@crate::Adjustment#value-changed] signal.
81 ///
82 ///
83 ///
84 ///
85 /// #### `value-changed`
86 /// Emitted when the value has been changed.
87 ///
88 ///
89 ///
90 /// # Implements
91 ///
92 /// [`AdjustmentExt`][trait@crate::prelude::AdjustmentExt], [`trait@glib::ObjectExt`]
93 #[doc(alias = "GtkAdjustment")]
94 pub struct Adjustment(Object<ffi::GtkAdjustment, ffi::GtkAdjustmentClass>);
95
96 match fn {
97 type_ => || ffi::gtk_adjustment_get_type(),
98 }
99}
100
101impl Adjustment {
102 pub const NONE: Option<&'static Adjustment> = None;
103
104 /// Creates a new [`Adjustment`][crate::Adjustment].
105 /// ## `value`
106 /// the initial value
107 /// ## `lower`
108 /// the minimum value
109 /// ## `upper`
110 /// the maximum value
111 /// ## `step_increment`
112 /// the step increment
113 /// ## `page_increment`
114 /// the page increment
115 /// ## `page_size`
116 /// the page size
117 ///
118 /// # Returns
119 ///
120 /// a new [`Adjustment`][crate::Adjustment]
121 #[doc(alias = "gtk_adjustment_new")]
122 pub fn new(
123 value: f64,
124 lower: f64,
125 upper: f64,
126 step_increment: f64,
127 page_increment: f64,
128 page_size: f64,
129 ) -> Adjustment {
130 assert_initialized_main_thread!();
131 unsafe {
132 from_glib_none(ffi::gtk_adjustment_new(
133 value,
134 lower,
135 upper,
136 step_increment,
137 page_increment,
138 page_size,
139 ))
140 }
141 }
142
143 // rustdoc-stripper-ignore-next
144 /// Creates a new builder-pattern struct instance to construct [`Adjustment`] objects.
145 ///
146 /// This method returns an instance of [`AdjustmentBuilder`](crate::builders::AdjustmentBuilder) which can be used to create [`Adjustment`] objects.
147 pub fn builder() -> AdjustmentBuilder {
148 AdjustmentBuilder::new()
149 }
150}
151
152impl Default for Adjustment {
153 fn default() -> Self {
154 glib::object::Object::new::<Self>()
155 }
156}
157
158// rustdoc-stripper-ignore-next
159/// A [builder-pattern] type to construct [`Adjustment`] objects.
160///
161/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
162#[must_use = "The builder must be built to be used"]
163pub struct AdjustmentBuilder {
164 builder: glib::object::ObjectBuilder<'static, Adjustment>,
165}
166
167impl AdjustmentBuilder {
168 fn new() -> Self {
169 Self {
170 builder: glib::object::Object::builder(),
171 }
172 }
173
174 /// The minimum value of the adjustment.
175 pub fn lower(self, lower: f64) -> Self {
176 Self {
177 builder: self.builder.property("lower", lower),
178 }
179 }
180
181 /// The page increment of the adjustment.
182 pub fn page_increment(self, page_increment: f64) -> Self {
183 Self {
184 builder: self.builder.property("page-increment", page_increment),
185 }
186 }
187
188 /// The page size of the adjustment.
189 ///
190 /// Note that the page-size is irrelevant and should be set to zero
191 /// if the adjustment is used for a simple scalar value, e.g. in a
192 /// [`SpinButton`][crate::SpinButton].
193 pub fn page_size(self, page_size: f64) -> Self {
194 Self {
195 builder: self.builder.property("page-size", page_size),
196 }
197 }
198
199 /// The step increment of the adjustment.
200 pub fn step_increment(self, step_increment: f64) -> Self {
201 Self {
202 builder: self.builder.property("step-increment", step_increment),
203 }
204 }
205
206 /// The maximum value of the adjustment.
207 ///
208 /// Note that values will be restricted by `upper - page-size` if the page-size
209 /// property is nonzero.
210 pub fn upper(self, upper: f64) -> Self {
211 Self {
212 builder: self.builder.property("upper", upper),
213 }
214 }
215
216 /// The value of the adjustment.
217 pub fn value(self, value: f64) -> Self {
218 Self {
219 builder: self.builder.property("value", value),
220 }
221 }
222
223 // rustdoc-stripper-ignore-next
224 /// Build the [`Adjustment`].
225 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
226 pub fn build(self) -> Adjustment {
227 assert_initialized_main_thread!();
228 self.builder.build()
229 }
230}
231
232/// Trait containing all [`struct@Adjustment`] methods.
233///
234/// # Implementors
235///
236/// [`Adjustment`][struct@crate::Adjustment]
237pub trait AdjustmentExt: IsA<Adjustment> + 'static {
238 /// Updates the value of the adjustment to ensure that the
239 /// given range is contained in the current page.
240 ///
241 /// The current page goes from `value` to `value` + `page-size`.
242 /// If the range is larger than the page size, then only the
243 /// start of it will be in the current page.
244 ///
245 /// A [`value-changed`][struct@crate::Adjustment#value-changed] signal will be emitted
246 /// if the value is changed.
247 /// ## `lower`
248 /// the lower value
249 /// ## `upper`
250 /// the upper value
251 #[doc(alias = "gtk_adjustment_clamp_page")]
252 fn clamp_page(&self, lower: f64, upper: f64) {
253 unsafe {
254 ffi::gtk_adjustment_clamp_page(self.as_ref().to_glib_none().0, lower, upper);
255 }
256 }
257
258 /// Sets all properties of the adjustment at once.
259 ///
260 /// Use this function to avoid multiple emissions of the
261 /// [`changed`][struct@crate::Adjustment#changed] signal. See
262 /// [`set_lower()`][Self::set_lower()] for an alternative
263 /// way of compressing multiple emissions of
264 /// [`changed`][struct@crate::Adjustment#changed] into one.
265 /// ## `value`
266 /// the new value
267 /// ## `lower`
268 /// the new minimum value
269 /// ## `upper`
270 /// the new maximum value
271 /// ## `step_increment`
272 /// the new step increment
273 /// ## `page_increment`
274 /// the new page increment
275 /// ## `page_size`
276 /// the new page size
277 #[doc(alias = "gtk_adjustment_configure")]
278 fn configure(
279 &self,
280 value: f64,
281 lower: f64,
282 upper: f64,
283 step_increment: f64,
284 page_increment: f64,
285 page_size: f64,
286 ) {
287 unsafe {
288 ffi::gtk_adjustment_configure(
289 self.as_ref().to_glib_none().0,
290 value,
291 lower,
292 upper,
293 step_increment,
294 page_increment,
295 page_size,
296 );
297 }
298 }
299
300 /// Retrieves the minimum value of the adjustment.
301 ///
302 /// # Returns
303 ///
304 /// the minimum value
305 #[doc(alias = "gtk_adjustment_get_lower")]
306 #[doc(alias = "get_lower")]
307 fn lower(&self) -> f64 {
308 unsafe { ffi::gtk_adjustment_get_lower(self.as_ref().to_glib_none().0) }
309 }
310
311 /// Gets the smaller of step increment and page increment.
312 ///
313 /// # Returns
314 ///
315 /// the minimum increment
316 #[doc(alias = "gtk_adjustment_get_minimum_increment")]
317 #[doc(alias = "get_minimum_increment")]
318 fn minimum_increment(&self) -> f64 {
319 unsafe { ffi::gtk_adjustment_get_minimum_increment(self.as_ref().to_glib_none().0) }
320 }
321
322 /// Retrieves the page increment of the adjustment.
323 ///
324 /// # Returns
325 ///
326 /// the page increment
327 #[doc(alias = "gtk_adjustment_get_page_increment")]
328 #[doc(alias = "get_page_increment")]
329 #[doc(alias = "page-increment")]
330 fn page_increment(&self) -> f64 {
331 unsafe { ffi::gtk_adjustment_get_page_increment(self.as_ref().to_glib_none().0) }
332 }
333
334 /// Retrieves the page size of the adjustment.
335 ///
336 /// # Returns
337 ///
338 /// the page size
339 #[doc(alias = "gtk_adjustment_get_page_size")]
340 #[doc(alias = "get_page_size")]
341 #[doc(alias = "page-size")]
342 fn page_size(&self) -> f64 {
343 unsafe { ffi::gtk_adjustment_get_page_size(self.as_ref().to_glib_none().0) }
344 }
345
346 /// Retrieves the step increment of the adjustment.
347 ///
348 /// # Returns
349 ///
350 /// the step increment
351 #[doc(alias = "gtk_adjustment_get_step_increment")]
352 #[doc(alias = "get_step_increment")]
353 #[doc(alias = "step-increment")]
354 fn step_increment(&self) -> f64 {
355 unsafe { ffi::gtk_adjustment_get_step_increment(self.as_ref().to_glib_none().0) }
356 }
357
358 /// Retrieves the maximum value of the adjustment.
359 ///
360 /// # Returns
361 ///
362 /// the maximum value
363 #[doc(alias = "gtk_adjustment_get_upper")]
364 #[doc(alias = "get_upper")]
365 fn upper(&self) -> f64 {
366 unsafe { ffi::gtk_adjustment_get_upper(self.as_ref().to_glib_none().0) }
367 }
368
369 /// Gets the current value of the adjustment.
370 ///
371 /// # Returns
372 ///
373 /// the current value
374 #[doc(alias = "gtk_adjustment_get_value")]
375 #[doc(alias = "get_value")]
376 fn value(&self) -> f64 {
377 unsafe { ffi::gtk_adjustment_get_value(self.as_ref().to_glib_none().0) }
378 }
379
380 /// Sets the minimum value of the adjustment.
381 ///
382 /// When setting multiple adjustment properties via their individual
383 /// setters, multiple [`changed`][struct@crate::Adjustment#changed] signals will
384 /// be emitted. However, since the emission of the
385 /// [`changed`][struct@crate::Adjustment#changed] signal is tied to the emission
386 /// of the ::notify signals of the changed properties, it’s possible
387 /// to compress the [`changed`][struct@crate::Adjustment#changed] signals into one
388 /// by calling g_object_freeze_notify() and g_object_thaw_notify()
389 /// around the calls to the individual setters.
390 ///
391 /// Alternatively, using a single g_object_set() for all the properties
392 /// to change, or using [`configure()`][Self::configure()] has the same effect.
393 /// ## `lower`
394 /// the new minimum value
395 #[doc(alias = "gtk_adjustment_set_lower")]
396 #[doc(alias = "lower")]
397 fn set_lower(&self, lower: f64) {
398 unsafe {
399 ffi::gtk_adjustment_set_lower(self.as_ref().to_glib_none().0, lower);
400 }
401 }
402
403 /// Sets the page increment of the adjustment.
404 ///
405 /// See [`set_lower()`][Self::set_lower()] about how to compress
406 /// multiple emissions of the [`changed`][struct@crate::Adjustment#changed]
407 /// signal when setting multiple adjustment properties.
408 /// ## `page_increment`
409 /// the new page increment
410 #[doc(alias = "gtk_adjustment_set_page_increment")]
411 #[doc(alias = "page-increment")]
412 fn set_page_increment(&self, page_increment: f64) {
413 unsafe {
414 ffi::gtk_adjustment_set_page_increment(self.as_ref().to_glib_none().0, page_increment);
415 }
416 }
417
418 /// Sets the page size of the adjustment.
419 ///
420 /// See [`set_lower()`][Self::set_lower()] about how to compress
421 /// multiple emissions of the [`changed`][struct@crate::Adjustment#changed]
422 /// signal when setting multiple adjustment properties.
423 /// ## `page_size`
424 /// the new page size
425 #[doc(alias = "gtk_adjustment_set_page_size")]
426 #[doc(alias = "page-size")]
427 fn set_page_size(&self, page_size: f64) {
428 unsafe {
429 ffi::gtk_adjustment_set_page_size(self.as_ref().to_glib_none().0, page_size);
430 }
431 }
432
433 /// Sets the step increment of the adjustment.
434 ///
435 /// See [`set_lower()`][Self::set_lower()] about how to compress
436 /// multiple emissions of the [`changed`][struct@crate::Adjustment#changed]
437 /// signal when setting multiple adjustment properties.
438 /// ## `step_increment`
439 /// the new step increment
440 #[doc(alias = "gtk_adjustment_set_step_increment")]
441 #[doc(alias = "step-increment")]
442 fn set_step_increment(&self, step_increment: f64) {
443 unsafe {
444 ffi::gtk_adjustment_set_step_increment(self.as_ref().to_glib_none().0, step_increment);
445 }
446 }
447
448 /// Sets the maximum value of the adjustment.
449 ///
450 /// Note that values will be restricted by `upper - page-size`
451 /// if the page-size property is nonzero.
452 ///
453 /// See [`set_lower()`][Self::set_lower()] about how to compress
454 /// multiple emissions of the [`changed`][struct@crate::Adjustment#changed]
455 /// signal when setting multiple adjustment properties.
456 /// ## `upper`
457 /// the new maximum value
458 #[doc(alias = "gtk_adjustment_set_upper")]
459 #[doc(alias = "upper")]
460 fn set_upper(&self, upper: f64) {
461 unsafe {
462 ffi::gtk_adjustment_set_upper(self.as_ref().to_glib_none().0, upper);
463 }
464 }
465
466 /// Sets the [`Adjustment`][crate::Adjustment] value.
467 ///
468 /// The value is clamped to lie between [`lower`][struct@crate::Adjustment#lower]
469 /// and [`upper`][struct@crate::Adjustment#upper].
470 ///
471 /// Note that for adjustments which are used in a [`Scrollbar`][crate::Scrollbar],
472 /// the effective range of allowed values goes from
473 /// [`lower`][struct@crate::Adjustment#lower] to
474 /// [`upper`][struct@crate::Adjustment#upper] - [`page-size`][struct@crate::Adjustment#page-size].
475 /// ## `value`
476 /// the new value
477 #[doc(alias = "gtk_adjustment_set_value")]
478 #[doc(alias = "value")]
479 fn set_value(&self, value: f64) {
480 unsafe {
481 ffi::gtk_adjustment_set_value(self.as_ref().to_glib_none().0, value);
482 }
483 }
484
485 /// Emitted when one or more of the [`Adjustment`][crate::Adjustment] properties have been
486 /// changed.
487 ///
488 /// Note that the [`value`][struct@crate::Adjustment#value] property is
489 /// covered by the [`value-changed`][struct@crate::Adjustment#value-changed] signal.
490 #[doc(alias = "changed")]
491 fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
492 unsafe extern "C" fn changed_trampoline<P: IsA<Adjustment>, F: Fn(&P) + 'static>(
493 this: *mut ffi::GtkAdjustment,
494 f: glib::ffi::gpointer,
495 ) {
496 unsafe {
497 let f: &F = &*(f as *const F);
498 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
499 }
500 }
501 unsafe {
502 let f: Box_<F> = Box_::new(f);
503 connect_raw(
504 self.as_ptr() as *mut _,
505 c"changed".as_ptr() as *const _,
506 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
507 changed_trampoline::<Self, F> as *const (),
508 )),
509 Box_::into_raw(f),
510 )
511 }
512 }
513
514 /// Emitted when the value has been changed.
515 #[doc(alias = "value-changed")]
516 fn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
517 unsafe extern "C" fn value_changed_trampoline<P: IsA<Adjustment>, F: Fn(&P) + 'static>(
518 this: *mut ffi::GtkAdjustment,
519 f: glib::ffi::gpointer,
520 ) {
521 unsafe {
522 let f: &F = &*(f as *const F);
523 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
524 }
525 }
526 unsafe {
527 let f: Box_<F> = Box_::new(f);
528 connect_raw(
529 self.as_ptr() as *mut _,
530 c"value-changed".as_ptr() as *const _,
531 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
532 value_changed_trampoline::<Self, F> as *const (),
533 )),
534 Box_::into_raw(f),
535 )
536 }
537 }
538
539 #[doc(alias = "lower")]
540 fn connect_lower_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
541 unsafe extern "C" fn notify_lower_trampoline<P: IsA<Adjustment>, F: Fn(&P) + 'static>(
542 this: *mut ffi::GtkAdjustment,
543 _param_spec: glib::ffi::gpointer,
544 f: glib::ffi::gpointer,
545 ) {
546 unsafe {
547 let f: &F = &*(f as *const F);
548 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
549 }
550 }
551 unsafe {
552 let f: Box_<F> = Box_::new(f);
553 connect_raw(
554 self.as_ptr() as *mut _,
555 c"notify::lower".as_ptr() as *const _,
556 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
557 notify_lower_trampoline::<Self, F> as *const (),
558 )),
559 Box_::into_raw(f),
560 )
561 }
562 }
563
564 #[doc(alias = "page-increment")]
565 fn connect_page_increment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
566 unsafe extern "C" fn notify_page_increment_trampoline<
567 P: IsA<Adjustment>,
568 F: Fn(&P) + 'static,
569 >(
570 this: *mut ffi::GtkAdjustment,
571 _param_spec: glib::ffi::gpointer,
572 f: glib::ffi::gpointer,
573 ) {
574 unsafe {
575 let f: &F = &*(f as *const F);
576 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
577 }
578 }
579 unsafe {
580 let f: Box_<F> = Box_::new(f);
581 connect_raw(
582 self.as_ptr() as *mut _,
583 c"notify::page-increment".as_ptr() as *const _,
584 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
585 notify_page_increment_trampoline::<Self, F> as *const (),
586 )),
587 Box_::into_raw(f),
588 )
589 }
590 }
591
592 #[doc(alias = "page-size")]
593 fn connect_page_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
594 unsafe extern "C" fn notify_page_size_trampoline<
595 P: IsA<Adjustment>,
596 F: Fn(&P) + 'static,
597 >(
598 this: *mut ffi::GtkAdjustment,
599 _param_spec: glib::ffi::gpointer,
600 f: glib::ffi::gpointer,
601 ) {
602 unsafe {
603 let f: &F = &*(f as *const F);
604 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
605 }
606 }
607 unsafe {
608 let f: Box_<F> = Box_::new(f);
609 connect_raw(
610 self.as_ptr() as *mut _,
611 c"notify::page-size".as_ptr() as *const _,
612 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
613 notify_page_size_trampoline::<Self, F> as *const (),
614 )),
615 Box_::into_raw(f),
616 )
617 }
618 }
619
620 #[doc(alias = "step-increment")]
621 fn connect_step_increment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
622 unsafe extern "C" fn notify_step_increment_trampoline<
623 P: IsA<Adjustment>,
624 F: Fn(&P) + 'static,
625 >(
626 this: *mut ffi::GtkAdjustment,
627 _param_spec: glib::ffi::gpointer,
628 f: glib::ffi::gpointer,
629 ) {
630 unsafe {
631 let f: &F = &*(f as *const F);
632 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
633 }
634 }
635 unsafe {
636 let f: Box_<F> = Box_::new(f);
637 connect_raw(
638 self.as_ptr() as *mut _,
639 c"notify::step-increment".as_ptr() as *const _,
640 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
641 notify_step_increment_trampoline::<Self, F> as *const (),
642 )),
643 Box_::into_raw(f),
644 )
645 }
646 }
647
648 #[doc(alias = "upper")]
649 fn connect_upper_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
650 unsafe extern "C" fn notify_upper_trampoline<P: IsA<Adjustment>, F: Fn(&P) + 'static>(
651 this: *mut ffi::GtkAdjustment,
652 _param_spec: glib::ffi::gpointer,
653 f: glib::ffi::gpointer,
654 ) {
655 unsafe {
656 let f: &F = &*(f as *const F);
657 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
658 }
659 }
660 unsafe {
661 let f: Box_<F> = Box_::new(f);
662 connect_raw(
663 self.as_ptr() as *mut _,
664 c"notify::upper".as_ptr() as *const _,
665 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
666 notify_upper_trampoline::<Self, F> as *const (),
667 )),
668 Box_::into_raw(f),
669 )
670 }
671 }
672
673 #[doc(alias = "value")]
674 fn connect_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
675 unsafe extern "C" fn notify_value_trampoline<P: IsA<Adjustment>, F: Fn(&P) + 'static>(
676 this: *mut ffi::GtkAdjustment,
677 _param_spec: glib::ffi::gpointer,
678 f: glib::ffi::gpointer,
679 ) {
680 unsafe {
681 let f: &F = &*(f as *const F);
682 f(Adjustment::from_glib_borrow(this).unsafe_cast_ref())
683 }
684 }
685 unsafe {
686 let f: Box_<F> = Box_::new(f);
687 connect_raw(
688 self.as_ptr() as *mut _,
689 c"notify::value".as_ptr() as *const _,
690 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
691 notify_value_trampoline::<Self, F> as *const (),
692 )),
693 Box_::into_raw(f),
694 )
695 }
696 }
697}
698
699impl<O: IsA<Adjustment>> AdjustmentExt for O {}