~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to widgets/eggnotificationbubble.h

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* EggNotificationBubble
 
2
 * Copyright (C) 2005 Colin Walters <walters@verbum.org>
 
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 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.
 
18
 */
 
19
 
 
20
#ifndef __EGG_NOTIFICATION_BUBBLE_H__
 
21
#define __EGG_NOTIFICATION_BUBBLE_H__
 
22
 
 
23
#include <gtk/gtkwidget.h>
 
24
#include <gtk/gtkwindow.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
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))
 
34
 
 
35
 
 
36
typedef struct _EggNotificationBubble    EggNotificationBubble;
 
37
typedef struct _EggNotificationBubbleClass EggNotificationBubbleClass;
 
38
typedef struct _EggNotificationBubbleData        EggNotificationBubbleData;
 
39
 
 
40
struct _EggNotificationBubble
 
41
{
 
42
  GtkObject parent_instance;
 
43
 
 
44
  GtkWidget *widget;
 
45
 
 
46
  guint timeout_id;
 
47
 
 
48
  char *bubble_header_text;
 
49
  char *bubble_body_text;
 
50
  GtkWidget *icon;
 
51
 
 
52
  gboolean active;
 
53
  GtkWidget *bubble_window;
 
54
  GtkWidget *main_hbox;
 
55
  GtkWidget *bubble_header_label;
 
56
  GtkWidget *bubble_body_label;
 
57
};
 
58
 
 
59
struct _EggNotificationBubbleClass
 
60
{
 
61
  GtkObjectClass parent_class;
 
62
 
 
63
  void (*clicked) (void);
 
64
  void (*timeout) (void);
 
65
 
 
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);
 
71
};
 
72
 
 
73
GType            egg_notification_bubble_get_type          (void) G_GNUC_CONST;
 
74
EggNotificationBubble*   egg_notification_bubble_new       (void);
 
75
 
 
76
void             egg_notification_bubble_attach (EggNotificationBubble *bubble, GtkWidget *widget);
 
77
 
 
78
void             egg_notification_bubble_set (EggNotificationBubble   *bubble,
 
79
                                              const gchar             *notification_header,
 
80
                                              GtkWidget               *icon,
 
81
                                              const gchar             *notification_body);
 
82
 
 
83
void             egg_notification_bubble_show (EggNotificationBubble *bubble, guint timeout);
 
84
void             egg_notification_bubble_hide (EggNotificationBubble *bubble);
 
85
 
 
86
gboolean         egg_notification_bubble_get_info_from_tip_window (GtkWindow    *window,
 
87
                                                        EggNotificationBubble **bubble,
 
88
                                                        GtkWidget   **current_widget);
 
89
 
 
90
G_END_DECLS
 
91
 
 
92
#endif /* __EGG_NOTIFICATION_BUBBLE_H__ */