2008-05-05 Paolo Borelli <pborelli@katamail.com>
[nautilus.git] / libnautilus-private / nautilus-view-factory.h
blob6e8080e97b6e695e8753da0f98cdecac0a2d9a48
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
3 nautilus-view-factory.h: register and create NautilusViews
5 Copyright (C) 2004 Red Hat Inc.
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 the
10 License, or (at your option) any later version.
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 GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public
18 License along with this program; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Author: Alexander Larsson <alexl@redhat.com>
25 #ifndef NAUTILUS_VIEW_FACTORY_H
26 #define NAUTILUS_VIEW_FACTORY_H
28 #include <string.h>
30 #include <libnautilus-private/nautilus-view.h>
31 #include <libnautilus-private/nautilus-window-info.h>
32 #include <gio/gio.h>
34 G_BEGIN_DECLS
36 typedef struct _NautilusViewInfo NautilusViewInfo;
38 struct _NautilusViewInfo {
39 char *id;
40 char *view_combo_label; /* Foo View (used in preferences dialog and navigation combo) */
41 char *view_menu_label_with_mnemonic; /* View -> _Foo (this is the "_Foo" part) */
42 char *error_label; /* The foo view encountered an error. */
43 char *startup_error_label; /* The foo view encountered an error while starting up. */
44 char *display_location_label; /* Display this location with the foo view. */
45 NautilusView * (*create) (NautilusWindowInfo *window);
46 /* BONOBOTODO: More args here */
47 gboolean (*supports_uri) (const char *uri,
48 GFileType file_type,
49 const char *mime_type);
53 void nautilus_view_factory_register (NautilusViewInfo *view_info);
54 const NautilusViewInfo *nautilus_view_factory_lookup (const char *id);
55 NautilusView * nautilus_view_factory_create (const char *id,
56 NautilusWindowInfo *window);
57 gboolean nautilus_view_factory_view_supports_uri (const char *id,
58 GFile *location,
59 GFileType file_type,
60 const char *mime_type);
61 GList * nautilus_view_factory_get_views_for_uri (const char *uri,
62 GFileType file_type,
63 const char *mime_type);
68 G_END_DECLS
70 #endif /* NAUTILUS_VIEW_FACTORY_H */