Trees | Index | Help |
---|
Module gwy :: Class Resource |
|
Resource
struct contains private data only and
should be accessed using the functions below.
Method Summary | |
---|---|
Builds file name a resource should be saved to. | |
Emits signal "data-changed" on a resource. | |
Clears is_modified flag of a resource. | |
Returns: True if resource is modifiable,
False if it's fixed (system) | |
Returns: True if resource is preferred,
False otherwise. | |
Returns: Name of resource . | |
Tells whether a resource is currently in use. | |
Releases a resource. | |
Sets preferability of a resource. | |
Dumps a resource to a textual (human readable) form. | |
Starts using a resource. |
Method Details |
---|
build_filename()Builds file name a resource should be saved to. If the resource has not been newly created, renamed, or system it was probably loaded from file of the same name.
|
data_changed()Emits signal "data-changed" on a resource. It can be called only on non-constant resources. The default handler
sets |
data_saved()Clears |
get_is_modifiable()Returns:True if resource is modifiable,
False if it's fixed (system)
|
get_is_preferred()Returns:True if resource is preferred,
False otherwise.
|
get_name()Returns: Name ofresource . The string is owned
by resource and must not
|
is_used()Tells whether a resource is currently in use. SeeResource.use () for details.
|
release()Releases a resource. When the number of resource uses drops to zero, it frees all auxiliary data and returns back to `latent' form. In addition, it calls g_object_unref() on it. SeeResource.use () for more.
|
set_is_preferred(is_preferred)Sets preferability of a resource.
|
UNIMPLEMENTED_dump()Dumps a resource to a textual (human readable) form.
|
use()Starts using a resource. Call to this function is necessary to use a resource properly. It makes the resource to create any auxiliary structures that consume considerable amount of memory and perform other initialization to ready-to-use form. When a resource is no longer used, it should be released with In addition, it calls g_object_ref() on the resource. Resources usually exist through almost whole program lifetime fromGObject perspective, but from the viewpoint of use
this method is the constructor and Resource.release () is the destructor.
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Dec 30 04:01:41 2008 | http://epydoc.sf.net |