]> Pileus Git - ~andy/gtk/blob - gtk/gtkstatusbar.h
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
[~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
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 /*
22  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
23  * file for a list of people on the GTK+ Team.  See the ChangeLog
24  * files for a list of changes.  These files are distributed with
25  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
26  */
27
28 #ifndef __GTK_STATUSBAR_H__
29 #define __GTK_STATUSBAR_H__
30
31 #include <gtk/gtkhbox.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36
37 #define GTK_STATUSBAR(obj)          GTK_CHECK_CAST (obj, gtk_statusbar_get_type (), GtkStatusbar)
38 #define GTK_STATUSBAR_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gtk_statusbar_get_type (), GtkStatusbarClass)
39 #define GTK_IS_STATUSBAR(obj)       GTK_CHECK_TYPE (obj, gtk_statusbar_get_type ())
40
41 typedef struct _GtkStatusbar      GtkStatusbar;
42 typedef struct _GtkStatusbarClass GtkStatusbarClass;
43 typedef struct _GtkStatusbarMsg GtkStatusbarMsg;
44
45 struct _GtkStatusbar
46 {
47   GtkHBox parent_widget;
48
49   GtkWidget *frame;
50   GtkWidget *label;
51
52   GSList *messages;
53   GSList *keys;
54
55   guint seq_context_id;
56   guint seq_message_id;
57 };
58
59 struct _GtkStatusbarClass
60 {
61   GtkHBoxClass parent_class;
62
63   GMemChunk *messages_mem_chunk;
64
65   void  (*text_pushed)  (GtkStatusbar   *statusbar,
66                          guint           context_id,
67                          const gchar    *text);
68   void  (*text_popped)  (GtkStatusbar   *statusbar,
69                          guint           context_id,
70                          const gchar    *text);
71 };
72
73 struct _GtkStatusbarMsg
74 {
75   gchar *text;
76   guint context_id;
77   guint message_id;
78 };
79
80 guint      gtk_statusbar_get_type       (void);
81 GtkWidget* gtk_statusbar_new            (void);
82 guint      gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
83                                          const gchar  *context_description);
84 /* Returns message_id used for gtk_statusbar_remove */
85 guint      gtk_statusbar_push           (GtkStatusbar *statusbar,
86                                          guint         context_id,
87                                          const gchar  *text);
88 void       gtk_statusbar_pop            (GtkStatusbar *statusbar,
89                                          guint         context_id);
90 void       gtk_statusbar_remove         (GtkStatusbar *statusbar,
91                                          guint         context_id,
92                                          guint         message_id);
93
94
95
96 #ifdef __cplusplus
97
98 #endif /* __cplusplus */
99 #endif /* __GTK_STATUSBAR_H__ */