summaryrefslogtreecommitdiff
path: root/libnautilus-extension
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-01-09 17:20:16 -0500
committerCosimo Cecchi <cosimoc@gnome.org>2012-01-09 17:22:47 -0500
commit6003b063ee2af39644d4138e52ae93bd5b513ac1 (patch)
tree3271fa6c18b7c9f640dc2e2ddf3808902d8f4d97 /libnautilus-extension
parent0d0eb9b50e5fd24a09bc2b9c141950fb75d86db3 (diff)
downloadnautilus-6003b063ee2af39644d4138e52ae93bd5b513ac1.tar.gz
extension: add some annotations
Diffstat (limited to 'libnautilus-extension')
-rw-r--r--libnautilus-extension/nautilus-file-info.c64
-rw-r--r--libnautilus-extension/nautilus-location-widget-provider.c8
2 files changed, 72 insertions, 0 deletions
diff --git a/libnautilus-extension/nautilus-file-info.c b/libnautilus-extension/nautilus-file-info.c
index 38a1e427c..da1e30cfd 100644
--- a/libnautilus-extension/nautilus-file-info.c
+++ b/libnautilus-extension/nautilus-file-info.c
@@ -25,6 +25,13 @@
NautilusFileInfo *(*nautilus_file_info_getter) (GFile *location, gboolean create);
+/**
+ * nautilus_file_info_list_copy:
+ * @files: (element-type NautilusFileInfo): the files to copy
+ *
+ * Returns: (element-type NautilusFileInfo) (transfer full): a copy of @files.
+ * Use #nautilus_file_info_list_free to free the list and unref its contents.
+ */
GList *
nautilus_file_info_list_copy (GList *files)
{
@@ -39,6 +46,12 @@ nautilus_file_info_list_copy (GList *files)
return ret;
}
+/**
+ * nautilus_file_info_list_free:
+ * @files: (element-type NautilusFileInfo): a list created with
+ * #nautilus_file_info_list_copy
+ *
+ */
void
nautilus_file_info_list_free (GList *files)
{
@@ -110,6 +123,12 @@ nautilus_file_info_get_name (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_name (file);
}
+/**
+ * nautilus_file_info_get_location:
+ * @file: a #NautilusFileInfo
+ *
+ * Returns: (transfer full): a #GFile for the location of @file
+ */
GFile *
nautilus_file_info_get_location (NautilusFileInfo *file)
{
@@ -136,6 +155,13 @@ nautilus_file_info_get_activation_uri (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_activation_uri (file);
}
+/**
+ * nautilus_file_info_get_parent_location:
+ * @file: a #NautilusFileInfo
+ *
+ * Returns: (allow-none) (transfer full): a #GFile for the parent location of @file,
+ * or %NULL if @file has no parent
+ */
GFile *
nautilus_file_info_get_parent_location (NautilusFileInfo *file)
{
@@ -154,6 +180,13 @@ nautilus_file_info_get_parent_uri (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_uri (file);
}
+/**
+ * nautilus_file_info_get_parent_info:
+ * @file: a #NautilusFileInfo
+ *
+ * Returns: (allow-none) (transfer full): a #NautilusFileInfo for the parent of @file,
+ * or %NULL if @file has no parent
+ */
NautilusFileInfo *
nautilus_file_info_get_parent_info (NautilusFileInfo *file)
{
@@ -163,6 +196,13 @@ nautilus_file_info_get_parent_info (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_info (file);
}
+/**
+ * nautilus_file_info_get_mount:
+ * @file: a #NautilusFileInfo
+ *
+ * Returns: (allow-none) (transfer full): a #GMount for the mount of @file,
+ * or %NULL if @file has no mount
+ */
GMount *
nautilus_file_info_get_mount (NautilusFileInfo *file)
{
@@ -265,18 +305,36 @@ nautilus_file_info_invalidate_extension_info (NautilusFileInfo *file)
NAUTILUS_FILE_INFO_GET_IFACE (file)->invalidate_extension_info (file);
}
+/**
+ * nautilus_file_info_lookup:
+ * @location: the location to lookup the file info for
+ *
+ * Returns: (transfer full): a #NautilusFileInfo
+ */
NautilusFileInfo *
nautilus_file_info_lookup (GFile *location)
{
return nautilus_file_info_getter (location, FALSE);
}
+/**
+ * nautilus_file_info_create:
+ * @location: the location to create the file info for
+ *
+ * Returns: (transfer full): a #NautilusFileInfo
+ */
NautilusFileInfo *
nautilus_file_info_create (GFile *location)
{
return nautilus_file_info_getter (location, TRUE);
}
+/**
+ * nautilus_file_info_lookup_for_uri:
+ * @uri: the URI to lookup the file info for
+ *
+ * Returns: (transfer full): a #NautilusFileInfo
+ */
NautilusFileInfo *
nautilus_file_info_lookup_for_uri (const char *uri)
{
@@ -290,6 +348,12 @@ nautilus_file_info_lookup_for_uri (const char *uri)
return file;
}
+/**
+ * nautilus_file_info_create_for_uri:
+ * @uri: the URI to lookup the file info for
+ *
+ * Returns: (transfer full): a #NautilusFileInfo
+ */
NautilusFileInfo *
nautilus_file_info_create_for_uri (const char *uri)
{
diff --git a/libnautilus-extension/nautilus-location-widget-provider.c b/libnautilus-extension/nautilus-location-widget-provider.c
index 7e09d57c2..48a21fb9a 100644
--- a/libnautilus-extension/nautilus-location-widget-provider.c
+++ b/libnautilus-extension/nautilus-location-widget-provider.c
@@ -59,6 +59,14 @@ nautilus_location_widget_provider_get_type (void)
return type;
}
+/**
+ * nautilus_location_widget_provider_get_widget:
+ * @provider: a #NautilusLocationWidgetProvider
+ * @uri: the URI of the location
+ * @window: parent #GtkWindow
+ *
+ * Returns: (transfer none): the location widget for @provider at @uri
+ */
GtkWidget *
nautilus_location_widget_provider_get_widget (NautilusLocationWidgetProvider *provider,
const char *uri,