1
/* EggNotificationBubble
2
* Copyright (C) 2005 Colin Walters <walters@verbum.org>
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.
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.
14
* You should have received a copy of the GNU Lesser General Public
15
* 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.
20
#ifndef __EGG_NOTIFICATION_BUBBLE_H__
21
#define __EGG_NOTIFICATION_BUBBLE_H__
23
#include <gtk/gtkwidget.h>
24
#include <gtk/gtkwindow.h>
28
#define EGG_TYPE_NOTIFICATION_BUBBLE (egg_notification_bubble_get_type ())
29
#define EGG_NOTIFICATION_BUBBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_NOTIFICATION_BUBBLE, EggNotificationBubble))
30
#define EGG_NOTIFICATION_BUBBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_NOTIFICATION_BUBBLE, EggNotificationBubbleClass))
31
#define EGG_IS_NOTIFICATION_BUBBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_NOTIFICATION_BUBBLE))
32
#define EGG_IS_NOTIFICATION_BUBBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_NOTIFICATION_BUBBLE))
33
#define EGG_NOTIFICATION_BUBBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_NOTIFICATION_BUBBLE, EggNotificationBubbleClass))
36
typedef struct _EggNotificationBubble EggNotificationBubble;
37
typedef struct _EggNotificationBubbleClass EggNotificationBubbleClass;
38
typedef struct _EggNotificationBubbleData EggNotificationBubbleData;
40
struct _EggNotificationBubble
42
GtkObject parent_instance;
48
char *bubble_header_text;
49
char *bubble_body_text;
53
GtkWidget *bubble_window;
55
GtkWidget *bubble_header_label;
56
GtkWidget *bubble_body_label;
59
struct _EggNotificationBubbleClass
61
GtkObjectClass parent_class;
63
void (*clicked) (void);
64
void (*timeout) (void);
66
/* Padding for future expansion */
67
void (*_gtk_reserved1) (void);
68
void (*_gtk_reserved2) (void);
69
void (*_gtk_reserved3) (void);
70
void (*_gtk_reserved4) (void);
73
GType egg_notification_bubble_get_type (void) G_GNUC_CONST;
74
EggNotificationBubble* egg_notification_bubble_new (void);
76
void egg_notification_bubble_attach (EggNotificationBubble *bubble, GtkWidget *widget);
78
void egg_notification_bubble_set (EggNotificationBubble *bubble,
79
const gchar *notification_header,
81
const gchar *notification_body);
83
void egg_notification_bubble_show (EggNotificationBubble *bubble, guint timeout);
84
void egg_notification_bubble_hide (EggNotificationBubble *bubble);
86
gboolean egg_notification_bubble_get_info_from_tip_window (GtkWindow *window,
87
EggNotificationBubble **bubble,
88
GtkWidget **current_widget);
92
#endif /* __EGG_NOTIFICATION_BUBBLE_H__ */