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