Resource.from_data


Description:

public Resource.from_data (Bytes data) throws Error

Creates a GResource from a reference to the binary resource bundle.

This will keep a reference to data while the resource lives, so the data should not be modified or freed.

If you want to use this resource in the global resource namespace you need to register it with resources_register.

Parameters:

data

A Bytes

Returns:

a new Resource, or null on error