### Method

# GIRepository Repository find_by_gtype

since: 2.80

#### Declaration

    GIBaseInfo*
    gi_repository_find_by_gtype (
      GIRepository* repository,
      GType gtype
    )

#### Description

Searches all loaded namespaces for a particular `GType`.

Note that in order to locate the metadata, the namespace corresponding to the type must first have been loaded. There is currently no mechanism for determining the namespace which corresponds to an arbitrary `GType` — thus, this function will operate most reliably when you know the `GType` is from a loaded namespace.

Available since: 2.80

#### Parameters

`gtype`

  Type: `GType`

  `GType` to search for.

#### Return value

Type: `GIBaseInfo`

`GIBaseInfo` representing metadata about `type`, or `NULL` if none found.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.