GnuCash  5.6-150-g038405b370+
gnc-menu-extensions.h
1 /********************************************************************\
2  * gnc-menu-extensions.h -- functions to build dynamic menus *
3  * Copyright (C) 1999 Rob Browning *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program 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 *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA gnu@gnu.org *
21 \********************************************************************/
22 
23 #ifndef GNC_MENU_EXTENSIONS_H
24 #define GNC_MENU_EXTENSIONS_H
25 
26 #include <libguile.h>
27 
28 typedef enum
29 {
30  GNC_MENU_ITEM,
31  GNC_SUB_MENU_ITEM,
32  GNC_SEPARATOR_ITEM,
33 } GNCMenuItemTypes;
34 
35 typedef struct _ExtensionInfo
36 {
37  SCM extension;
38 
39  gchar *action_label;
40  gchar *action_name;
41  gchar *action_tooltip;
42 
43  gchar *path;
44  gchar *sort_key;
45  const gchar *typeStr;
46 
47  GNCMenuItemTypes type;
48  gboolean accel_assigned;
50 
51 GSList *gnc_extensions_get_menu_list (void);
52 void gnc_extension_invoke_cb (SCM extension, SCM window);
53 
60 void gnc_add_scm_extension (SCM extension);
61 
65 void gnc_extensions_shutdown (void);
66 
67 #endif