summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-icon-view.h
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 22:24:23 -0300
committerPerberos <[email protected]>2011-12-01 22:24:23 -0300
commit0e004c696b0e68b2cff37a4c3315b022a35eaf43 (patch)
tree43261e815529cb9518ed7be37af13b846af8b26b /src/file-manager/fm-icon-view.h
downloadcaja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.bz2
caja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'src/file-manager/fm-icon-view.h')
-rw-r--r--src/file-manager/fm-icon-view.h135
1 files changed, 135 insertions, 0 deletions
diff --git a/src/file-manager/fm-icon-view.h b/src/file-manager/fm-icon-view.h
new file mode 100644
index 00000000..2ef11a56
--- /dev/null
+++ b/src/file-manager/fm-icon-view.h
@@ -0,0 +1,135 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* fm-icon-view.h - interface for icon view of directory.
+
+ Copyright (C) 2000 Eazel, Inc.
+
+ The Mate Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The Mate Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the Mate Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ Authors: John Sullivan <[email protected]>
+*/
+
+#ifndef FM_ICON_VIEW_H
+#define FM_ICON_VIEW_H
+
+#include "fm-directory-view.h"
+
+typedef struct FMIconView FMIconView;
+typedef struct FMIconViewClass FMIconViewClass;
+
+#define FM_TYPE_ICON_VIEW fm_icon_view_get_type()
+#define FM_ICON_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), FM_TYPE_ICON_VIEW, FMIconView))
+#define FM_ICON_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), FM_TYPE_ICON_VIEW, FMIconViewClass))
+#define FM_IS_ICON_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FM_TYPE_ICON_VIEW))
+#define FM_IS_ICON_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), FM_TYPE_ICON_VIEW))
+#define FM_ICON_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_ICON_VIEW, FMIconViewClass))
+
+#define FM_ICON_VIEW_ID "OAFIID:Caja_File_Manager_Icon_View"
+#define FM_COMPACT_VIEW_ID "OAFIID:Caja_File_Manager_Compact_View"
+
+typedef struct FMIconViewDetails FMIconViewDetails;
+
+struct FMIconView
+{
+ FMDirectoryView parent;
+ FMIconViewDetails *details;
+};
+
+struct FMIconViewClass
+{
+ FMDirectoryViewClass parent_class;
+
+ /* Methods that can be overriden for settings you don't want to come from metadata.
+ */
+
+ /* Note: get_directory_sort_by must return a string that can/will be g_freed.
+ */
+ char * (* get_directory_sort_by) (FMIconView *icon_view,
+ CajaFile *file);
+ void (* set_directory_sort_by) (FMIconView *icon_view,
+ CajaFile *file,
+ const char* sort_by);
+
+ gboolean (* get_directory_sort_reversed) (FMIconView *icon_view,
+ CajaFile *file);
+ void (* set_directory_sort_reversed) (FMIconView *icon_view,
+ CajaFile *file,
+ gboolean sort_reversed);
+
+ gboolean (* get_directory_auto_layout) (FMIconView *icon_view,
+ CajaFile *file);
+ void (* set_directory_auto_layout) (FMIconView *icon_view,
+ CajaFile *file,
+ gboolean auto_layout);
+
+ gboolean (* get_directory_tighter_layout) (FMIconView *icon_view,
+ CajaFile *file);
+ void (* set_directory_tighter_layout) (FMIconView *icon_view,
+ CajaFile *file,
+ gboolean tighter_layout);
+
+ /* Override "clean_up" if your subclass has its own notion of where icons should be positioned */
+ void (* clean_up) (FMIconView *icon_view);
+
+ /* supports_auto_layout is a function pointer that subclasses may
+ * override to control whether or not the automatic layout options
+ * should be enabled. The default implementation returns TRUE.
+ */
+ gboolean (* supports_auto_layout) (FMIconView *view);
+
+ /* supports_manual_layout is a function pointer that subclasses may
+ * override to control whether or not the manual layout options
+ * should be enabled. The default implementation returns TRUE iff
+ * not in compact mode.
+ */
+ gboolean (* supports_manual_layout) (FMIconView *view);
+
+ /* supports_scaling is a function pointer that subclasses may
+ * override to control whether or not the manual layout supports
+ * scaling. The default implementation returns FALSE
+ */
+ gboolean (* supports_scaling) (FMIconView *view);
+
+ /* supports_auto_layout is a function pointer that subclasses may
+ * override to control whether snap-to-grid mode
+ * should be enabled. The default implementation returns FALSE.
+ */
+ gboolean (* supports_keep_aligned) (FMIconView *view);
+
+ /* supports_auto_layout is a function pointer that subclasses may
+ * override to control whether snap-to-grid mode
+ * should be enabled. The default implementation returns FALSE.
+ */
+ gboolean (* supports_labels_beside_icons) (FMIconView *view);
+};
+
+/* GObject support */
+GType fm_icon_view_get_type (void);
+int fm_icon_view_compare_files (FMIconView *icon_view,
+ CajaFile *a,
+ CajaFile *b);
+void fm_icon_view_filter_by_screen (FMIconView *icon_view, gboolean filter);
+gboolean fm_icon_view_is_compact (FMIconView *icon_view);
+
+void fm_icon_view_register (void);
+void fm_compact_view_register (void);
+
+#endif /* FM_ICON_VIEW_H */