OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
statusbar.c
Go to the documentation of this file.
1 /*
2  * mape - C4 Landscape.txt editor
3  *
4  * Copyright (c) 2005-2009, Armin Burgmeier
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #include <stdlib.h>
17 #include <gtk/gtk.h>
18 #include "mape/statusbar.h"
19 
21 {
22  MapeStatusbar* bar;
23  bar = malloc(sizeof(MapeStatusbar) );
24 
25  bar->bar = gtk_statusbar_new();
26  bar->context_compile = gtk_statusbar_get_context_id(
27  GTK_STATUSBAR(bar->bar),
28  "Compiler report"
29  );
30 
31  gtk_statusbar_push(
32  GTK_STATUSBAR(bar->bar),
33  bar->context_compile,
34  "Initialized"
35  );
36 
37  gtk_widget_show(bar->bar);
38 
39  return bar;
40 }
41 
43 {
44  free(bar);
45 }
46 
48  const gchar* text)
49 {
50  gtk_statusbar_pop(GTK_STATUSBAR(bar->bar), bar->context_compile);
51  gtk_statusbar_push(GTK_STATUSBAR(bar->bar), bar->context_compile, text);
52 }
guint context_compile
Definition: statusbar.h:25
void mape_statusbar_destroy(MapeStatusbar *bar)
Definition: statusbar.c:42
void mape_statusbar_set_compile(MapeStatusbar *bar, const gchar *text)
Definition: statusbar.c:47
MapeStatusbar * mape_statusbar_new(void)
Definition: statusbar.c:20
GtkWidget * bar
Definition: statusbar.h:23