Functions

get_license_display_name (license)

get_license_file (license)

hello_sample_function (file)

is_composite_tv_screen (screen)

profile_probe_start (file, line, function, name)

Details

Endless.get_license_display_name(license)
Parameters:

license (str) – The license name

Returns:

A string for the specified license name and the current locale.

Return type:

str

Retrieves the display name for the specified license and the current locale.

New in version 0.4.

Endless.get_license_file(license)
Parameters:

license (str) – The license name

Returns:

A Gio.File for the specified license name and the current locale. It returns None if the license is not found or does not have an associated file.

Return type:

Gio.File or None

Retrieves a Gio.File for the specified licene and the current locale.

New in version 0.4.

Endless.hello_sample_function(file)
Parameters:

file (Gio.File or None) – Gio.File to write to, or None

Raises:

GLib.Error

Returns:

True on success, False on error.

Return type:

bool

A sample API function to say hello with. Prints on the terminal if file is None, or else appends it to file.

Endless.is_composite_tv_screen(screen)
Parameters:

screen (Gdk.Screen or None) – a Gdk.Screen, or None to use the default display’s default screen.

Returns:

True if screen is a composite TV, otherwise False.

Return type:

bool

Determines whether screen is a composite TV out.

New in version 0.6.

Endless.profile_probe_start(file, line, function, name)
Parameters:
  • file (str) – the source file for the probe, typically represented by %__FILE__

  • line (int) – the line in the source file, typically represented by %__LINE__

  • function (str) – the function for the probe, typically represented by %G_STRFUNC

  • name (str) – a unique name for the probe

Returns:

a profile probe identifier; use Endless.ProfileProbe.stop() to stop the profiling on the returned probe

Return type:

Endless.ProfileProbe

Starts a profiling probe for name, creating it if necessary.

New in version 0.6.