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
32
#include "nautilus-view.h"
33
#include "nautilus-window-slot.h"
37
typedef struct _NautilusViewInfo NautilusViewInfo;
39
struct _NautilusViewInfo {
41
char *view_combo_label; /* Foo View (used in preferences dialog and navigation combo) */
42
char *view_menu_label_with_mnemonic; /* View -> _Foo (this is the "_Foo" part) */
43
char *error_label; /* The foo view encountered an error. */
44
char *startup_error_label; /* The foo view encountered an error while starting up. */
45
char *display_location_label; /* Display this location with the foo view. */
46
NautilusView * (*create) (NautilusWindowSlot *slot);
47
/* BONOBOTODO: More args here */
48
gboolean (*supports_uri) (const char *uri,
50
const char *mime_type);
54
void nautilus_view_factory_register (NautilusViewInfo *view_info);
55
const NautilusViewInfo *nautilus_view_factory_lookup (const char *id);
56
NautilusView * nautilus_view_factory_create (const char *id,
57
NautilusWindowSlot *slot);
58
gboolean nautilus_view_factory_view_supports_uri (const char *id,
61
const char *mime_type);
62
GList * nautilus_view_factory_get_views_for_uri (const char *uri,
64
const char *mime_type);
71
#endif /* NAUTILUS_VIEW_FACTORY_H */