1 /* 2 * caja-info-provider.h - Interface for Caja extensions that 3 * provide info about files. 4 * 5 * Copyright (C) 2003 Novell, Inc. 6 * Copyright (C) 2005 Red Hat, Inc. 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the Free 20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: Dave Camp <dave@ximian.com> 23 * Alexander Larsson <alexl@redhat.com> 24 * 25 */ 26 27 /* This interface is implemented by Caja extensions that want to 28 * provide extra location widgets for a particular location. 29 * Extensions are called when Caja displays a location. 30 */ 31 32 #ifndef CAJA_LOCATION_WIDGET_PROVIDER_H 33 #define CAJA_LOCATION_WIDGET_PROVIDER_H 34 35 #include <glib-object.h> 36 #include <gtk/gtk.h> 37 #include "caja-extension-types.h" 38 39 G_BEGIN_DECLS 40 41 #define CAJA_TYPE_LOCATION_WIDGET_PROVIDER (caja_location_widget_provider_get_type ()) 42 #define CAJA_LOCATION_WIDGET_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAJA_TYPE_LOCATION_WIDGET_PROVIDER, CajaLocationWidgetProvider)) 43 #define CAJA_IS_LOCATION_WIDGET_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAJA_TYPE_LOCATION_WIDGET_PROVIDER)) 44 #define CAJA_LOCATION_WIDGET_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CAJA_TYPE_LOCATION_WIDGET_PROVIDER, CajaLocationWidgetProviderIface)) 45 46 typedef struct _CajaLocationWidgetProvider CajaLocationWidgetProvider; 47 typedef struct _CajaLocationWidgetProviderIface CajaLocationWidgetProviderIface; 48 49 /** 50 * CajaLocationWidgetProviderIface: 51 * @g_iface: The parent interface. 52 * @get_widget: Returns a #GtkWidget. 53 * See caja_location_widget_provider_get_widget() for details. 54 * 55 * Interface for extensions to provide additional location widgets. 56 */ 57 struct _CajaLocationWidgetProviderIface { 58 GTypeInterface g_iface; 59 60 GtkWidget *(*get_widget) (CajaLocationWidgetProvider *provider, 61 const char *uri, 62 GtkWidget *window); 63 }; 64 65 /* Interface Functions */ 66 GType caja_location_widget_provider_get_type (void); 67 GtkWidget *caja_location_widget_provider_get_widget (CajaLocationWidgetProvider *provider, 68 const char *uri, 69 GtkWidget *window); 70 G_END_DECLS 71 72 #endif 73