1 /*
2  *  nautilus-column-provider.h - Interface for Nautilus extensions that
3  *                               provide column descriptions.
4  *
5  *  Copyright (C) 2003 Novell, Inc.
6  *
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.
11  *
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.
16  *
17  *  You should have received a copy of the GNU Library General Public
18  *  License along with this library; if not, see <http://www.gnu.org/licenses/>.
19  *
20  *  Author:  Dave Camp <dave@ximian.com>
21  *
22  */
23 
24 /* This interface is implemented by Nautilus extensions that want to
25  * add columns to the list view and details to the icon view.
26  * Extensions are asked for a list of columns to display.  Each
27  * returned column refers to a string attribute which can be filled in
28  * by NautilusInfoProvider */
29 
30 #pragma once
31 
32 #if !defined (NAUTILUS_EXTENSION_H) && !defined (NAUTILUS_COMPILATION)
33 #warning "Only <nautilus-extension.h> should be included directly."
34 #endif
35 
36 #include <glib-object.h>
37 /* These should be removed at some point. */
38 #include "nautilus-extension-types.h"
39 #include "nautilus-column.h"
40 
41 G_BEGIN_DECLS
42 
43 #define NAUTILUS_TYPE_COLUMN_PROVIDER (nautilus_column_provider_get_type ())
44 
45 G_DECLARE_INTERFACE (NautilusColumnProvider, nautilus_column_provider,
46                      NAUTILUS, COLUMN_PROVIDER,
47                      GObject)
48 
49 /* For compatibility reasons, remove this once you start introducing breaking changes. */
50 typedef NautilusColumnProviderInterface NautilusColumnProviderIface;
51 
52 /**
53  * SECTION:nautilus-column-provider
54  * @title: NautilusColumnProvider
55  * @short_description: Interface to provide additional list view columns
56  *
57  * #NautilusColumnProvider allows extension to provide additional columns
58  * in the file manager list view.
59  */
60 
61 /**
62  * NautilusColumnProviderInterface:
63  * @g_iface: The parent interface.
64  * @get_columns: Returns a #GList of #NautilusColumn.
65  *               See nautilus_column_provider_get_columns() for details.
66  *
67  * Interface for extensions to provide additional list view columns.
68  */
69 struct _NautilusColumnProviderInterface
70 {
71     GTypeInterface g_iface;
72 
73     GList *(*get_columns) (NautilusColumnProvider *provider);
74 };
75 
76 /**
77  * nautilus_column_provider_get_columns:
78  * @provider: a #NautilusColumnProvider
79  *
80  * Returns: (element-type NautilusColumn) (transfer full): the provided #NautilusColumn objects
81  */
82 GList *nautilus_column_provider_get_columns (NautilusColumnProvider *provider);
83 
84 G_END_DECLS
85