Functions

get_player_from_ancestor (widget)

get_resource ()

Details

ClapperGtk.get_player_from_ancestor(widget)
Parameters:

widget (Gtk.Widget) – a Gtk.Widget

Returns:

a Clapper.Player from ancestor of a widget.

Return type:

Clapper.Player or None

Get [class`Clapper`.Player] used by [class`ClapperGtk`.Video] ancestor of widget.

This utility is a convenience wrapper for calling [method`Gtk`.Widget.get_ancestor] of type CLAPPER_GTK_TYPE_VIDEO and [method`ClapperGtk`.Video.get_player] with additional None checking and type casting.

This is meant to be used mainly for custom widget development as an easy access to the underlying parent [class`Clapper`.Player] object. If you want to get the player from [class`ClapperGtk`.Video] widget itself, use [method`ClapperGtk`.Video.get_player] instead.

Rememeber that this function will return None when widget does not have a [class`ClapperGtk`.Video] ancestor in widget hierarchy (widget is not yet placed).

ClapperGtk.get_resource()
Return type:

Gio.Resource