summaryrefslogtreecommitdiff
path: root/libcaja-extension/caja-widget-view-provider.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-31 16:51:14 +0800
committerraveit65 <[email protected]>2019-08-26 14:21:14 +0200
commit00f68491bad7d3cd06e013f3bdba4282f9afcf62 (patch)
tree5171025a9477f46f5954cc6fc5d35b89e96a7ebf /libcaja-extension/caja-widget-view-provider.c
parent35876a8ad959dac4561e0c0fc753cb303c9c6283 (diff)
downloadcaja-00f68491bad7d3cd06e013f3bdba4282f9afcf62.tar.bz2
caja-00f68491bad7d3cd06e013f3bdba4282f9afcf62.tar.xz
add new interface
Diffstat (limited to 'libcaja-extension/caja-widget-view-provider.c')
-rw-r--r--libcaja-extension/caja-widget-view-provider.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/libcaja-extension/caja-widget-view-provider.c b/libcaja-extension/caja-widget-view-provider.c
index d678fb26..44b33001 100644
--- a/libcaja-extension/caja-widget-view-provider.c
+++ b/libcaja-extension/caja-widget-view-provider.c
@@ -1,9 +1,8 @@
/* vi: set sw=4 ts=4 wrap ai: */
/*
- * caja-widget-view-provider.c: This file is part of ____
- *
- * Copyright (C) 2019 yetist <yetist@yetipc>
+ * caja-widget-view-provider.c: This file is part of caja.
*
+ * Copyright (C) 2019 Wu Xiaotian <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -86,8 +85,8 @@ caja_widget_view_provider_get_widget (CajaWidgetViewProvider *provider)
/**
* caja_widget_view_provider_add_file:
* @provider: a #CajaWidgetViewProvider
- * @file:
- * @directory:
+ * @file:
+ * @directory:
*
*
**/
@@ -129,6 +128,29 @@ void caja_widget_view_provider_set_window (CajaWidgetViewProvider *provider, Gtk
CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->set_window (provider, window);
}
+guint caja_widget_view_provider_get_item_count (CajaWidgetViewProvider *provider)
+{
+ g_return_val_if_fail (CAJA_IS_WIDGET_VIEW_PROVIDER (provider), 0);
+ g_return_val_if_fail (CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->get_item_count != NULL, 0);
+
+ return CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->get_item_count (provider);
+}
+
+gchar* caja_widget_view_provider_get_first_visible_file (CajaWidgetViewProvider *provider)
+{
+ g_return_val_if_fail (CAJA_IS_WIDGET_VIEW_PROVIDER (provider), NULL);
+ g_return_val_if_fail (CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->get_first_visible_file != NULL, NULL);
+
+ return CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->get_first_visible_file (provider);
+}
+
+void caja_widget_view_provider_clear (CajaWidgetViewProvider *provider)
+{
+ g_return_if_fail (CAJA_IS_WIDGET_VIEW_PROVIDER (provider));
+ g_return_if_fail (CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->clear != NULL);
+
+ CAJA_WIDGET_VIEW_PROVIDER_GET_IFACE (provider)->clear (provider);
+}
/**
* caja_widget_view_provider_supports_uri: