]> Pileus Git - ~andy/gtk/blob - gtk/gtkstatusbar.h
added new flag GTK_EXCLUSIVE_GRAB. allow exclusive grabs.
[~andy/gtk] / gtk / gtkstatusbar.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  * GtkStatusbar Copyright (C) 1998 Shawn T. Amundson
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #ifndef __GTK_STATUSBAR_H__
21 #define __GTK_STATUSBAR_H__
22
23 #include <gtk/gtkhbox.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 #define GTK_STATUSBAR(obj)          GTK_CHECK_CAST (obj, gtk_statusbar_get_type (), GtkStatusbar)
30 #define GTK_STATUSBAR_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gtk_statusbar_get_type (), GtkStatusbarClass)
31 #define GTK_IS_STATUSBAR(obj)       GTK_CHECK_TYPE (obj, gtk_statusbar_get_type ())
32
33 typedef struct _GtkStatusbar      GtkStatusbar;
34 typedef struct _GtkStatusbarClass GtkStatusbarClass;
35 typedef struct _GtkStatusbarMsg GtkStatusbarMsg;
36
37 struct _GtkStatusbar
38 {
39   GtkHBox parent_widget;
40
41   GtkWidget *frame;
42   GtkWidget *label;
43
44   GSList *messages;
45   GSList *keys;
46
47   guint seq_context_id;
48   guint seq_message_id;
49 };
50
51 struct _GtkStatusbarClass
52 {
53   GtkHBoxClass parent_class;
54
55   GMemChunk *messages_mem_chunk;
56
57   void  (*text_pushed)  (GtkStatusbar   *statusbar,
58                          guint           context_id,
59                          const gchar    *text);
60   void  (*text_popped)  (GtkStatusbar   *statusbar,
61                          guint           context_id,
62                          const gchar    *text);
63 };
64
65 struct _GtkStatusbarMsg
66 {
67   gchar *text;
68   guint context_id;
69   guint message_id;
70 };
71
72 guint      gtk_statusbar_get_type       (void);
73 GtkWidget* gtk_statusbar_new            (void);
74 guint      gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
75                                          const gchar  *context_description);
76 /* Returns message_id used for gtk_statusbar_remove */
77 guint      gtk_statusbar_push           (GtkStatusbar *statusbar,
78                                          guint         context_id,
79                                          const gchar  *text);
80 void       gtk_statusbar_pop            (GtkStatusbar *statusbar,
81                                          guint         context_id);
82 void       gtk_statusbar_remove         (GtkStatusbar *statusbar,
83                                          guint         context_id,
84                                          guint         message_id);
85
86
87
88 #ifdef __cplusplus
89
90 #endif /* __cplusplus */
91 #endif /* __GTK_STATUSBAR_H__ */