1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #ifndef __GTK_MENU_FACTORY_H__
20 #define __GTK_MENU_FACTORY_H__
23 #include <gtk/gtkwidget.h>
29 #endif /* __cplusplus */
32 typedef struct _GtkMenuEntry GtkMenuEntry;
33 typedef struct _GtkMenuPath GtkMenuPath;
34 typedef struct _GtkMenuFactory GtkMenuFactory;
36 typedef void (*GtkMenuCallback) (GtkWidget *widget,
43 GtkMenuCallback callback;
44 gpointer callback_data;
54 struct _GtkMenuFactory
57 GtkMenuFactoryType type;
58 GtkAccelGroup *accel_group;
63 /* Note: the use of GtkMenuFactory is strongly deprecated.
64 * use GtkItemFactory instead (gtkitemfactory.h and gtkitemfactory.c).
65 * gtkmenufactory.h and gtkmenufactory.c are sheduled for removal
66 * in some future gtk versions.
69 GtkMenuFactory* gtk_menu_factory_new (GtkMenuFactoryType type);
70 void gtk_menu_factory_destroy (GtkMenuFactory *factory);
71 void gtk_menu_factory_add_entries (GtkMenuFactory *factory,
72 GtkMenuEntry *entries,
74 void gtk_menu_factory_add_subfactory (GtkMenuFactory *factory,
75 GtkMenuFactory *subfactory,
77 void gtk_menu_factory_remove_paths (GtkMenuFactory *factory,
80 void gtk_menu_factory_remove_entries (GtkMenuFactory *factory,
81 GtkMenuEntry *entries,
83 void gtk_menu_factory_remove_subfactory (GtkMenuFactory *factory,
84 GtkMenuFactory *subfactory,
86 GtkMenuPath* gtk_menu_factory_find (GtkMenuFactory *factory,
92 #endif /* __cplusplus */
95 #endif /* __GTK_MENU_FACTORY_H__ */