PhoshNotifyManager

PhoshNotifyManager — Manages notifications

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusInterfaceSkeleton
        ╰── PhoshNotifyDBusNotificationsSkeleton
            ╰── PhoshNotifyManager

Implemented Interfaces

PhoshNotifyManager implements GDBusInterface and PhoshNotifyDBusNotifications.

Description

PhoshNotifyManager manages notifications sent from the shell iself and via the org.freedesktop.Notification DBus interface. See https://developer.gnome.org/notification-spec/

Functions

phosh_notify_manager_get_default ()

PhoshNotifyManager *
phosh_notify_manager_get_default (void);

phosh_notify_manager_get_list ()

PhoshNotificationList *
phosh_notify_manager_get_list (PhoshNotifyManager *self);

Get the PhoshNotificationList of current notifications

Parameters

self

the PhoshNotifyManager

 

Returns

the PhoshNotificationList


phosh_notify_manager_get_show_banners ()

gboolean
phosh_notify_manager_get_show_banners (PhoshNotifyManager *self);

Are notififcation banners enabled

Parameters

self

the PhoshNotifyManager

 

Returns

TRUE if banners should be shown, otherwise FALSE


phosh_notify_manager_get_notification_id ()

guint
phosh_notify_manager_get_notification_id
                               (PhoshNotifyManager *self);

Get a notification id

Parameters

self

the PhoshNotifyManager

 

Returns

a notification id that can be used to create new notifications.


phosh_notify_manager_add_notification ()

void
phosh_notify_manager_add_notification (PhoshNotifyManager *self,
                                       const gchar *source_id,
                                       int expire_timeout,
                                       PhoshNotification *notification);

Parameters

self

the PhoshNotifyManager

 

source_id

The notification source's app_id

 

expire_timeout

When the notification should expire

 

notification

The notification

 

Returns

Adds a notification notifications.


phosh_notify_manager_close_notification_by_id ()

gboolean
phosh_notify_manager_close_notification_by_id
                               (PhoshNotifyManager *self,
                                int id,
                                PhoshNotificationReason reason);

Types and Values

PHOSH_TYPE_NOTIFY_MANAGER

#define PHOSH_TYPE_NOTIFY_MANAGER             (phosh_notify_manager_get_type ())

PhoshNotifyManager

typedef struct _PhoshNotifyManager PhoshNotifyManager;

Signal Details

The “new-notification” signal

void
user_function (PhoshNotifyManager *self,
               PhoshNotification  *notification,
               gpointer            user_data)

Emitted when a new notification is received and a banner should (possibly) be shown

Parameters

self

the PhoshNotifyManager

 

notification

the new PhoshNotification

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last