Functions

get_app_name ()

get_server_caps ()

get_server_info ()

init (app_name)

is_initted ()

set_app_name (app_name)

uninit ()

Details

Notify.get_app_name()
Returns:

The registered application name, passed to [func`init`].

Return type:

str

Gets the application name registered.

Notify.get_server_caps()
Returns:

a list of server capability strings.

Return type:

[str]

Queries the server capabilities.

Synchronously queries the server for its capabilities and returns them in a list.

Notify.get_server_info()
Returns:

True if successful, and the variables passed will be set, False on error. The returned strings must be freed with GLib.free

ret_name:

a location to store the server name, or None

ret_vendor:

a location to store the server vendor, or None

ret_version:

a location to store the server version, or None

ret_spec_version:

a location to store the version the service is compliant with, or None

Return type:

(bool, ret_name: str, ret_vendor: str, ret_version: str, ret_spec_version: str)

Queries the server for information.

Synchronously queries the server for its information, specifically, the name, vendor, server version, and the version of the notifications specification that it is compliant with.

Notify.init(app_name)
Parameters:

app_name (str or None) – The name of the application initializing libnotify.

Returns:

True if successful, or False on error.

Return type:

bool

Initialized libnotify. This must be called before any other functions.

Starting from 0.8, if the provided app_name is None, libnotify will try to figure it out from the running application. Before it was not allowed, and was causing libnotify not to be initialized.

Notify.is_initted()
Returns:

True if libnotify is initialized, or False otherwise.

Return type:

bool

Gets whether or not libnotify is initialized.

Notify.set_app_name(app_name)
Parameters:

app_name (str) – The name of the application

Sets the application name.

Notify.uninit()

Uninitializes libnotify.

This should be called when the program no longer needs libnotify for the rest of its lifecycle, typically just before exitting.