[ CCode ( has_construct_function = false ) ]
public ContentProvider.union (owned ContentProvider[]? providers)
Creates a content provider that represents all the given providers
.
Whenever data needs to be written, the union provider will try the given providers
in the given order and the first one
supporting a format will be chosen to provide it.
This allows an easy way to support providing data in different formats. For example, an image may be provided by its file and by the image contents with a call such as ```c gdk_content_provider_new_union ((GdkContentProvider *[2]) { gdk_content_provider_new_typed ( G_TYPE_FILE, file), gdk_content_provider_new_typed (G_TYPE_TEXTURE, texture) }, 2); ```
providers |
The `GdkContentProvider`s to present the union of |
n_providers |
the number of providers |
a new `GdkContentProvider` |