AppStreamGlib.Icon¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.Icon(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod kind_from_string(icon_kind)[source]¶
- Parameters:
icon_kind (
str
) – the string.- Returns:
a
AppStreamGlib.IconKind
orAppStreamGlib.IconKind.UNKNOWN
for unknown- Return type:
Converts the text representation to an enumerated value.
New in version 0.1.0.
- classmethod kind_to_string(icon_kind)[source]¶
- Parameters:
icon_kind (
AppStreamGlib.IconKind
) – the AsIconKind.- Returns:
string version of icon_kind
- Return type:
Converts the enumerated value to an text representation.
New in version 0.1.0.
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.Icon
.New in version 0.3.1.
- convert_to_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.IconKind
) – aAppStreamGlib.IconKind
, e.g.AppStreamGlib.IconKind.EMBEDDED
- Raises:
- Returns:
True
for success- Return type:
Converts the icon from one kind to another.
New in version 0.3.1.
- get_filename()[source]¶
- Returns:
the absolute filename on disk
- Return type:
Gets the absolute path on disk of the icon. NOTE: This is only set for icons of type
AppStreamGlib.IconKind.LOCAL
New in version 0.3.2.
- get_height()[source]¶
- Returns:
height in pixels
- Return type:
Gets the icon height.
New in version 0.3.1.
- get_name()[source]¶
- Returns:
the basename of the icon
- Return type:
Gets the name of the icon, e.g. “epiphany.png”
New in version 0.3.1.
- get_pixbuf()[source]¶
- Returns:
the
GdkPixbuf.Pixbuf
, orNone
- Return type:
Gets the icon pixbuf if set.
New in version 0.3.1.
- get_prefix()[source]¶
- Returns:
filename
- Return type:
Gets the suggested prefix of the icon.
New in version 0.1.6.
- get_url()[source]¶
- Returns:
the fully qualified URL
- Return type:
Gets the full qualified URL for the icon, usually pointing at some mirror. NOTE: This is only set for icons of type
AppStreamGlib.IconKind.REMOTE
New in version 0.3.2.
- get_width()[source]¶
- Returns:
width in pixels
- Return type:
Gets the icon width.
New in version 0.3.1.
- load(flags)[source]¶
- Parameters:
flags (
AppStreamGlib.IconLoadFlags
) – aAppStreamGlib.IconLoadFlags
, e.g.AppStreamGlib.IconLoadFlags.SEARCH_SIZE
- Raises:
- Returns:
True
for success- Return type:
Loads the icon into a local pixbuf.
New in version 0.3.1.
- set_filename(filename)[source]¶
- Parameters:
filename (
str
) – the new icon URL.
Sets the icon absolute filename.
New in version 0.3.2.
- set_height(height)[source]¶
- Parameters:
height (
int
) – the height in pixels.
Sets the icon height.
New in version 0.3.1.
- set_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.IconKind
) – theAppStreamGlib.IconKind
, e.g.AppStreamGlib.IconKind.STOCK
.
Sets the icon kind.
New in version 0.3.1.
- set_name(name)[source]¶
- Parameters:
name (
str
) – the icon name, e.g. “gimp.png”
Sets the basename to use for the icon.
New in version 0.3.1.
- set_pixbuf(pixbuf)[source]¶
- Parameters:
pixbuf (
GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
, orNone
Sets the icon pixbuf.
New in version 0.3.1.
- set_prefix(prefix)[source]¶
- Parameters:
prefix (
str
) – the new filename prefix.
Sets the icon prefix filename.
New in version 0.1.6.
- set_scale(scale)[source]¶
- Parameters:
scale (
int
) – the scale as a factor.
Sets the icon scale.
New in version 0.6.13.