Gtk.BuilderScope
Description: Reference for Gtk.BuilderScope

### Interface

# GtkBuilderScope

since: 4.0

#### Description [src]

    interface Gtk.BuilderScope : GObject.Object

`GtkBuilderScope` is an interface to provide language binding support to `GtkBuilder`.

The goal of `GtkBuilderScope` is to look up programming-language-specific values for strings that are given in a `GtkBuilder` UI file.

The primary intended audience is bindings that want to provide deeper integration of `GtkBuilder` into the language.

A `GtkBuilderScope` instance may be used with multiple `GtkBuilder` objects, even at once.

By default, GTK will use its own implementation of `GtkBuilderScope` for the C language which can be created via `gtk_builder_cscope_new()`.

If you implement `GtkBuilderScope` for a language binding, you may want to (partially) derive from or fall back to a `GtkBuilderCScope`, as that class implements support for automatic lookups from C symbols.

Available since: 4.0

#### Prerequisite

In order to implement BuilderScope, your type must inherit from`GObject`.

#### Implementations

- GtkBuilderCScope

#### Interface structure

    struct GtkBuilderScopeInterface {
      GType (* get_type_from_name) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* type_name
      );
      GType (* get_type_from_function) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* function_name
      );
      GClosure* (* create_closure) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* function_name,
        GtkBuilderClosureFlags flags,
        GObject* object,
        GError** error
      );

    }

The virtual function table to implement for `GtkBuilderScope` implementations. Default implementations for each function do exist, but they usually just fail, so it is suggested that implementations implement all of them.

###### Interface members

`get_type_from_name` |
    GType (* get_type_from_name) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* type_name
      )
| No description available.
`get_type_from_function` |
    GType (* get_type_from_function) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* function_name
      )
| No description available.
`create_closure` |
    GClosure* (* create_closure) (
        GtkBuilderScope* self,
        GtkBuilder* builder,
        const char* function_name,
        GtkBuilderClosureFlags flags,
        GObject* object,
        GError** error
      )
| No description available.

#### Virtual methods

###### Gtk.BuilderScope.create_closure

No description available.

since: 4.0

###### Gtk.BuilderScope.get_type_from_function

No description available.

since: 4.0

###### Gtk.BuilderScope.get_type_from_name

No description available.

since: 4.0