NAImporterAsk: fix z-order
[nautilus-actions.git] / src / nact / nact-menubar.h
blobc27b76d5c4e7f6cf356c063829be385675793ee6
1 /*
2 * Nautilus-Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifndef __NACT_MENUBAR_H__
32 #define __NACT_MENUBAR_H__
35 * SECTION: nact-menubar
36 * @title: NactMenubar
37 * @short_description: The Menubar class definition
38 * @include: nact-menubar.h
40 * This is a convenience class which embeds the menubar of the application.
42 * There is one object (because there is one menubar). It is created by
43 * the main window at initialization time.
45 * Attaching the object to the window let us connect easily to all 'window'-
46 * class messages, thus reducing the count of needed public functions.
48 * The #NactMenubar object connects to BASE_SIGNAL_INITIALIZE_WINDOW signal
49 * at instanciation time. The caller (usually a #NactMainWindow) should take
50 * care to connect itself to this signal before creating the #NactMenubar
51 * object if it wants its callback be triggered first.
53 * The #NactMenubar object maintains as private data the indicators needed
54 * in order to rightly update menu items sensitivity.
55 * It is up to the application to update these indicators.
56 * Each time an indicator is updated, it triggers an update of all relevant
57 * menu items sensitivities.
59 * Toolbar and sort buttons are also driven by this menubar.
62 #include "base-window.h"
64 G_BEGIN_DECLS
66 #define NACT_MENUBAR_TYPE ( nact_menubar_get_type())
67 #define NACT_MENUBAR( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NACT_MENUBAR_TYPE, NactMenubar ))
68 #define NACT_MENUBAR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NACT_MENUBAR_TYPE, NactMenubarClass ))
69 #define NACT_IS_MENUBAR( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NACT_MENUBAR_TYPE ))
70 #define NACT_IS_MENUBAR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NACT_MENUBAR_TYPE ))
71 #define NACT_MENUBAR_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NACT_MENUBAR_TYPE, NactMenubarClass ))
73 typedef struct _NactMenubarPrivate NactMenubarPrivate;
75 typedef struct {
76 /*< private >*/
77 GObject parent;
78 NactMenubarPrivate *private;
80 NactMenubar;
82 typedef struct _NactMenubarClassPrivate NactMenubarClassPrivate;
84 typedef struct {
85 /*< private >*/
86 GObjectClass parent;
87 NactMenubarClassPrivate *private;
89 NactMenubarClass;
91 GType nact_menubar_get_type( void );
93 NactMenubar *nact_menubar_new ( BaseWindow *window );
95 void nact_menubar_save_items( BaseWindow *window );
97 /* *** */
98 gboolean nact_menubar_is_level_zero_order_changed( const BaseWindow *window );
99 /* *** */
101 G_END_DECLS
103 #endif /* __NACT_MENUBAR_H__ */