GnuCash  4.901-15-g732a005710
gnc-window.h
Go to the documentation of this file.
1 /*
2  * gnc-window.h -- structure which represents a GnuCash window.
3  *
4  * Copyright (C) 2003 Jan Arne Petersen <jpetersen@uni-bonn.de>
5  * Copyright (C) 2003 David Hampton <hampton@employees.org>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, contact:
19  *
20  * Free Software Foundation Voice: +1-617-542-5942
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
22  * Boston, MA 02110-1301, USA gnu@gnu.org
23  */
24 
41 #ifndef __GNC_WINDOW_H
42 #define __GNC_WINDOW_H
43 
44 #include <gtk/gtk.h>
45 #include "gnc-plugin-page.h"
46 
47 G_BEGIN_DECLS
48 
49 /* type macros */
50 #define GNC_TYPE_WINDOW (gnc_window_get_type ())
51 #define GNC_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_WINDOW, GncWindow))
52 #define GNC_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_WINDOW))
53 #define GNC_WINDOW_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GNC_TYPE_WINDOW, GncWindowIface))
54 
55 /* typedefs & structures */
56 typedef struct GncWindow GncWindow; /* dummy typedef */
57 
58 typedef struct
59 {
60  GTypeInterface parent;
61 
62  /* Virtual Table */
63  GtkWindow * (* get_gtk_window) (GncWindow *window);
64  GtkWidget * (* get_statusbar) (GncWindow *window);
65  GtkWidget * (* get_progressbar) (GncWindow *window);
66  GtkWidget * (* get_menubar) (GncWindow *window);
67  GtkWidget * (* get_toolbar) (GncWindow *window);
68  GMenuModel * (* get_menubar_model) (GncWindow *window);
69  void (* ui_set_sensitive) (GncWindow *window, gboolean sensitive);
71 
72 /* function prototypes */
73 GType gnc_window_get_type (void);
74 
75 GtkWindow *gnc_window_get_gtk_window (GncWindow *window);
76 
77 void gnc_window_update_status (GncWindow *window, GncPluginPage *page);
78 void gnc_window_set_status (GncWindow *window, GncPluginPage *page, const gchar *message);
79 
80 void gnc_window_set_progressbar_window (GncWindow *window);
81 GncWindow *gnc_window_get_progressbar_window (void);
82 GtkWidget *gnc_window_get_progressbar (GncWindow *window);
83 void gnc_window_show_progress (const char *message, double percentage);
84 GtkWidget *gnc_window_get_menubar (GncWindow *window);
85 GtkWidget *gnc_window_get_toolbar (GncWindow *window);
86 GtkWidget *gnc_window_get_statusbar (GncWindow *window);
87 GMenuModel *gnc_window_get_menubar_model (GncWindow *window);
88 
89 G_END_DECLS
90 
91 #endif /* __GNC_WINDOW_H */
92 
The instance data structure for a content plugin.
Functions for adding plugins to a GnuCash window.