13.2.6. IconHandle class

class keypirinha.IconHandle(icon_id)

An opaque handle object created by Plugin.load_icon() and by load_icon().

__bool__()

Indicate whether this handle has been free() or not.

__init__(icon_id)

Initialize self. See help(type(self)) for accurate signature.

__weakref__

list of weak references to the object (if defined)

free()

Frees the icon associated with this handle.

Returns

A boolean value to indicate whether resources have actually been freed or not. This method may return False if it has been called already for this handle, or by an other IconHandle object pointing to the same icon resource. You usually do not need to check the return value.

Return type

bool

Warning

This method must be called explicitly. It will not be called by the destructor of this object.

is_init()

Deprecated since version 2.9.6: Use standard __bool__() operator instead