gtk4/auto/
builder_scope.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::prelude::*;
7
8glib::wrapper! {
9    /// [`BuilderScope`][crate::BuilderScope] is an interface to provide language binding support
10    /// to [`Builder`][crate::Builder].
11    ///
12    /// The goal of [`BuilderScope`][crate::BuilderScope] is to look up programming-language-specific
13    /// values for strings that are given in a [`Builder`][crate::Builder] UI file.
14    ///
15    /// The primary intended audience is bindings that want to provide deeper
16    /// integration of [`Builder`][crate::Builder] into the language.
17    ///
18    /// A [`BuilderScope`][crate::BuilderScope] instance may be used with multiple [`Builder`][crate::Builder] objects,
19    /// even at once.
20    ///
21    /// By default, GTK will use its own implementation of [`BuilderScope`][crate::BuilderScope]
22    /// for the C language which can be created via `Gtk::BuilderCScope::new()`.
23    ///
24    /// If you implement [`BuilderScope`][crate::BuilderScope] for a language binding, you
25    /// may want to (partially) derive from or fall back to a `Gtk::BuilderCScope`,
26    /// as that class implements support for automatic lookups from C symbols.
27    ///
28    /// # Implements
29    ///
30    /// [`BuilderScopeExt`][trait@crate::prelude::BuilderScopeExt]
31    #[doc(alias = "GtkBuilderScope")]
32    pub struct BuilderScope(Interface<ffi::GtkBuilderScope, ffi::GtkBuilderScopeInterface>);
33
34    match fn {
35        type_ => || ffi::gtk_builder_scope_get_type(),
36    }
37}
38
39impl BuilderScope {
40    pub const NONE: Option<&'static BuilderScope> = None;
41}
42
43mod sealed {
44    pub trait Sealed {}
45    impl<T: super::IsA<super::BuilderScope>> Sealed for T {}
46}
47
48/// Trait containing all [`struct@BuilderScope`] methods.
49///
50/// # Implementors
51///
52/// [`BuilderScope`][struct@crate::BuilderScope]
53pub trait BuilderScopeExt: IsA<BuilderScope> + sealed::Sealed + 'static {}
54
55impl<O: IsA<BuilderScope>> BuilderScopeExt for O {}