Constructor
Gdk.ContentProvider.new_union
Declaration [src]
GdkContentProvider*
gdk_content_provider_new_union (
GdkContentProvider** providers,
gsize n_providers
)
Description [src]
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
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);
Parameters
providers |
An array of GdkContentProvider |
|
|
Can be NULL | |
The length of the array is in the n_providers argument | |
Ownership of the data is transferred to the callee | |
n_providers |
gsize |
the number of providers |
Return value
Returns: GdkContentProvider |
|
a new |
|
Ownership of the data is transferred to the caller |