1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4
* Based on gtk-notification from gnome-contacts:
5
* http://git.gnome.org/browse/gnome-contacts/tree/src/gtk-notification.c?id=3.3.91
7
* Copyright (C) Erick Pérez Castellanos 2011 <erick.red@gmail.com>
8
* Copyright (C) 2012 Red Hat, Inc.
10
* This program is free software: you can redistribute it and/or modify it
11
* under the terms of the GNU Lesser General Public License as published
12
* by the Free Software Foundation, either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful, but
16
* WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
* See the GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
24
#ifndef _GD_NOTIFICATION_H_
25
#define _GD_NOTIFICATION_H_
31
#define GD_TYPE_NOTIFICATION (gd_notification_get_type ())
32
#define GD_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GD_TYPE_NOTIFICATION, GdNotification))
33
#define GD_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GD_TYPE_NOTIFICATION, GdNotificationClass))
34
#define GTK_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GD_TYPE_NOTIFICATION))
35
#define GTK_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GD_TYPE_NOTIFICATION))
36
#define GD_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GD_TYPE_NOTIFICATION, GdNotificationClass))
38
typedef struct _GdNotificationPrivate GdNotificationPrivate;
39
typedef struct _GdNotificationClass GdNotificationClass;
40
typedef struct _GdNotification GdNotification;
42
struct _GdNotificationClass {
43
GtkBinClass parent_class;
46
void (*dismissed) (GdNotification *self);
49
struct _GdNotification {
50
GtkBin parent_instance;
53
GdNotificationPrivate *priv;
56
GType gd_notification_get_type (void) G_GNUC_CONST;
58
GtkWidget *gd_notification_new (void);
59
void gd_notification_set_timeout (GdNotification *notification,
61
void gd_notification_dismiss (GdNotification *notification);
62
void gd_notification_set_show_close_button (GdNotification *notification,
63
gboolean show_close_button);
67
#endif /* _GD_NOTIFICATION_H_ */