diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-04-07 21:51:52 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2017-02-15 01:27:41 +0100 |
commit | 1d166b5e3b34195efe04df950a3f5397c2c99ef7 (patch) | |
tree | 8b6eee8bd8215fd9d9de8e285a7d24b9740f0ccb /src/nautilus-view-item-model.h | |
parent | 370b1ab77ead9059eb7bd58a5e63431242becd8d (diff) | |
download | nautilus-1d166b5e3b34195efe04df950a3f5397c2c99ef7.tar.gz |
views: add flow box based view
After all the rework on the window slots, views, and splitting
the desktop, we are finally able to add a flow box based view for
Nautilus.
The GtkFlowBox is still not performance enough to be added as the
default view, not even as an alternative in the user preferences.
However, since the work on this is one of the biggest for Nautilus and
gtk+, the decision was to merge a prototype in order to open the
development, testing and iteration of the code in order to make it
good enough for, in a not so far away future, have it as the main view.
The work merged is not finished, and is an experiment and prototype in
more things than just the GtkFlowBox, we want to create a single shared
model with a complete MVC pattern between all the views. This will need
quite a few iterations to get it right, but once is done right, I hope
it's going to be good enough as an example to any application that wants
multiple types of views with the new widgets of gtk+.
This patch adds the GtkFlowBox view to be optionally used under a
gsetting called use-experimental-views, turned off by default.
Diffstat (limited to 'src/nautilus-view-item-model.h')
-rw-r--r-- | src/nautilus-view-item-model.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/nautilus-view-item-model.h b/src/nautilus-view-item-model.h new file mode 100644 index 000000000..39a8bc0dd --- /dev/null +++ b/src/nautilus-view-item-model.h @@ -0,0 +1,41 @@ +#ifndef NAUTILUS_VIEW_ITEM_MODEL_H +#define NAUTILUS_VIEW_ITEM_MODEL_H + +#include <glib.h> +#include <gtk/gtk.h> + +#include "nautilus-file.h" + +G_BEGIN_DECLS + +#define NAUTILUS_TYPE_VIEW_ITEM_MODEL (nautilus_view_item_model_get_type()) + +G_DECLARE_FINAL_TYPE (NautilusViewItemModel, nautilus_view_item_model, NAUTILUS, VIEW_ITEM_MODEL, GObject) + +NautilusViewItemModel * nautilus_view_item_model_new (NautilusFile *file, + guint icon_size); + +void nautilus_view_item_model_set_icon_size (NautilusViewItemModel *self, + guint icon_size); + +guint nautilus_view_item_model_get_icon_size (NautilusViewItemModel *self); + +void nautilus_view_item_model_set_file (NautilusViewItemModel *self, + NautilusFile *file); + +NautilusFile * nautilus_view_item_model_get_file (NautilusViewItemModel *self); + +void nautilus_view_item_model_set_selected (NautilusViewItemModel *self, + gboolean selected); + +gboolean nautilus_view_item_model_get_is_selected (NautilusViewItemModel *self); + +void nautilus_view_item_model_set_item_ui (NautilusViewItemModel *self, + GtkWidget *item_ui); + +GtkWidget * nautilus_view_item_model_get_item_ui (NautilusViewItemModel *self); + +G_END_DECLS + +#endif /* NAUTILUS_VIEW_ITEM_MODEL_H */ + |