Skip to content

Gio.Emblem

class — extends GObject.Object, Icon

GEmblem is an implementation of Icon that supports having an emblem, which is an icon with additional properties. It can than be added to a EmblemedIcon.

Currently, only metainformation about the emblem's origin is supported. More may be added in the future.

Constructors

new

@classmethod
def new(cls, icon: Icon) -> Emblem

Creates a new emblem for icon.

Parameters:

  • icon — a GIcon containing the icon.

new_with_origin

@classmethod
def new_with_origin(cls, icon: Icon, origin: EmblemOrigin | int) -> Emblem

Creates a new emblem for icon.

Parameters:

  • icon — a GIcon containing the icon.
  • origin — a GEmblemOrigin enum defining the emblem's origin

Methods

get_icon

def get_icon(self) -> Icon

Gives back the icon from emblem.

get_origin

def get_origin(self) -> EmblemOrigin

Gets the origin of the emblem.

Properties

icon

icon: GObject.Object  # read/write

The actual icon of the emblem.

origin

origin: EmblemOrigin | int  # read/write

The origin the emblem is derived from.