Add GNotification
[platform/upstream/glib.git] / gio / gnotification.h
1 /*
2  * Copyright © 2013 Lars Uebernickel
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General
15  * Public License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17  * Boston, MA 02111-1307, USA.
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
31 G_BEGIN_DECLS
32
33 #define G_TYPE_NOTIFICATION         (g_notification_get_type ())
34 #define G_NOTIFICATION(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION, GNotification))
35 #define G_IS_NOTIFICATION(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION))
36
37 GLIB_AVAILABLE_IN_2_40
38 GType                   g_notification_get_type                         (void) G_GNUC_CONST;
39
40 GLIB_AVAILABLE_IN_2_40
41 GNotification *         g_notification_new                              (const gchar *title);
42
43 GLIB_AVAILABLE_IN_2_40
44 void                    g_notification_set_title                        (GNotification *notification,
45                                                                          const gchar   *title);
46
47 GLIB_AVAILABLE_IN_2_40
48 void                    g_notification_set_body                         (GNotification *notification,
49                                                                          const gchar   *body);
50
51 GLIB_AVAILABLE_IN_2_40
52 void                    g_notification_set_image                        (GNotification *notification,
53                                                                          GIcon         *image);
54
55 GLIB_AVAILABLE_IN_2_40
56 void                    g_notification_set_urgent                       (GNotification *notification,
57                                                                          gboolean       urgent);
58
59 GLIB_AVAILABLE_IN_2_40
60 void                    g_notification_add_button                       (GNotification *notification,
61                                                                          const gchar   *label,
62                                                                          const gchar   *detailed_action);
63
64 GLIB_AVAILABLE_IN_2_40
65 void                    g_notification_add_button_with_target           (GNotification *notification,
66                                                                          const gchar   *label,
67                                                                          const gchar   *action,
68                                                                          const gchar   *target_format,
69                                                                          ...);
70
71 GLIB_AVAILABLE_IN_2_40
72 void                    g_notification_add_button_with_target_value     (GNotification *notification,
73                                                                          const gchar   *label,
74                                                                          const gchar   *action,
75                                                                          GVariant      *target);
76
77 GLIB_AVAILABLE_IN_2_40
78 void                    g_notification_set_default_action               (GNotification *notification,
79                                                                          const gchar   *detailed_action);
80
81 GLIB_AVAILABLE_IN_2_40
82 void                    g_notification_set_default_action_and_target    (GNotification *notification,
83                                                                          const gchar   *action,
84                                                                          const gchar   *target_format,
85                                                                          ...);
86
87 GLIB_AVAILABLE_IN_2_40
88 void                 g_notification_set_default_action_and_target_value (GNotification *notification,
89                                                                          const gchar   *action,
90                                                                          GVariant      *target);
91
92 G_END_DECLS
93
94 #endif