Updated Slovenian translation
[nautilus.git] / libnautilus-extension / nautilus-menu-provider.h
blobd23a1817217dc1d2a22046cd44d23384cfc12795
1 /*
2 * nautilus-menu-provider.h - Interface for Nautilus extensions that
3 * provide context menu items.
5 * Copyright (C) 2003 Novell, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library 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 GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Author: Dave Camp <dave@ximian.com>
25 /* This interface is implemented by Nautilus extensions that want to
26 * add context menu entries to files. Extensions are called when
27 * Nautilus constructs the context menu for a file. They are passed a
28 * list of NautilusFileInfo objects which holds the current selection */
30 #ifndef NAUTILUS_MENU_PROVIDER_H
31 #define NAUTILUS_MENU_PROVIDER_H
33 #include <glib-object.h>
34 #include <gtk/gtkwidget.h>
35 #include "nautilus-extension-types.h"
36 #include "nautilus-file-info.h"
37 #include "nautilus-menu.h"
39 G_BEGIN_DECLS
41 #define NAUTILUS_TYPE_MENU_PROVIDER (nautilus_menu_provider_get_type ())
42 #define NAUTILUS_MENU_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_MENU_PROVIDER, NautilusMenuProvider))
43 #define NAUTILUS_IS_MENU_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_MENU_PROVIDER))
44 #define NAUTILUS_MENU_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NAUTILUS_TYPE_MENU_PROVIDER, NautilusMenuProviderIface))
46 typedef struct _NautilusMenuProvider NautilusMenuProvider;
47 typedef struct _NautilusMenuProviderIface NautilusMenuProviderIface;
49 struct _NautilusMenuProviderIface {
50 GTypeInterface g_iface;
52 GList *(*get_file_items) (NautilusMenuProvider *provider,
53 GtkWidget *window,
54 GList *files);
55 GList *(*get_background_items) (NautilusMenuProvider *provider,
56 GtkWidget *window,
57 NautilusFileInfo *current_folder);
58 GList *(*get_toolbar_items) (NautilusMenuProvider *provider,
59 GtkWidget *window,
60 NautilusFileInfo *current_folder);
63 /* Interface Functions */
64 GType nautilus_menu_provider_get_type (void);
65 GList *nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
66 GtkWidget *window,
67 GList *files);
68 GList *nautilus_menu_provider_get_background_items (NautilusMenuProvider *provider,
69 GtkWidget *window,
70 NautilusFileInfo *current_folder);
71 GList *nautilus_menu_provider_get_toolbar_items (NautilusMenuProvider *provider,
72 GtkWidget *window,
73 NautilusFileInfo *current_folder);
75 /* This function emit a signal to inform nautilus that its item list has changed. */
76 void nautilus_menu_provider_emit_items_updated_signal (NautilusMenuProvider *provider);
78 G_END_DECLS
80 #endif