1/*
2 * Copyright © 2013 Lars Uebernickel
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 *
19 * Authors: Lars Uebernickel <lars@uebernic.de>
20 */
21
22#ifndef __G_NOTIFICATION_H__
23#define __G_NOTIFICATION_H__
24
25#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
26#error "Only <gio/gio.h> can be included directly."
27#endif
28
29#include <gio/giotypes.h>
30#include <gio/gioenums.h>
31
32G_BEGIN_DECLS
33
34#define G_TYPE_NOTIFICATION (g_notification_get_type ())
35#define G_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION, GNotification))
36#define G_IS_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION))
37
38GIO_AVAILABLE_IN_2_40
39GType g_notification_get_type (void) G_GNUC_CONST;
40
41GIO_AVAILABLE_IN_2_40
42GNotification * g_notification_new (const gchar *title);
43
44GIO_AVAILABLE_IN_2_40
45void g_notification_set_title (GNotification *notification,
46 const gchar *title);
47
48GIO_AVAILABLE_IN_2_40
49void g_notification_set_body (GNotification *notification,
50 const gchar *body);
51
52GIO_AVAILABLE_IN_2_40
53void g_notification_set_icon (GNotification *notification,
54 GIcon *icon);
55
56GIO_DEPRECATED_IN_2_42_FOR(g_notification_set_priority)
57void g_notification_set_urgent (GNotification *notification,
58 gboolean urgent);
59
60GIO_AVAILABLE_IN_2_42
61void g_notification_set_priority (GNotification *notification,
62 GNotificationPriority priority);
63
64GIO_AVAILABLE_IN_2_70
65void g_notification_set_category (GNotification *notification,
66 const gchar *category);
67
68GIO_AVAILABLE_IN_2_40
69void g_notification_add_button (GNotification *notification,
70 const gchar *label,
71 const gchar *detailed_action);
72
73GIO_AVAILABLE_IN_2_40
74void g_notification_add_button_with_target (GNotification *notification,
75 const gchar *label,
76 const gchar *action,
77 const gchar *target_format,
78 ...);
79
80GIO_AVAILABLE_IN_2_40
81void g_notification_add_button_with_target_value (GNotification *notification,
82 const gchar *label,
83 const gchar *action,
84 GVariant *target);
85
86GIO_AVAILABLE_IN_2_40
87void g_notification_set_default_action (GNotification *notification,
88 const gchar *detailed_action);
89
90GIO_AVAILABLE_IN_2_40
91void g_notification_set_default_action_and_target (GNotification *notification,
92 const gchar *action,
93 const gchar *target_format,
94 ...);
95
96GIO_AVAILABLE_IN_2_40
97void g_notification_set_default_action_and_target_value (GNotification *notification,
98 const gchar *action,
99 GVariant *target);
100
101G_END_DECLS
102
103#endif
104