1 /* Eye Of Gnome - Thumbnail View
2  *
3  * Copyright (C) 2006 The Free Software Foundation
4  *
5  * Author: Claudio Saavedra <csaavedra@alumnos.utalca.cl>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21 
22 #ifndef EOG_THUMB_VIEW_H
23 #define EOG_THUMB_VIEW_H
24 
25 #include "eog-image.h"
26 #include "eog-list-store.h"
27 
28 G_BEGIN_DECLS
29 
30 #define EOG_TYPE_THUMB_VIEW            (eog_thumb_view_get_type ())
31 #define EOG_THUMB_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_THUMB_VIEW, EogThumbView))
32 #define EOG_THUMB_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  EOG_TYPE_THUMB_VIEW, EogThumbViewClass))
33 #define EOG_IS_THUMB_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_THUMB_VIEW))
34 #define EOG_IS_THUMB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  EOG_TYPE_THUMB_VIEW))
35 #define EOG_THUMB_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  EOG_TYPE_THUMB_VIEW, EogThumbViewClass))
36 
37 typedef struct _EogThumbView EogThumbView;
38 typedef struct _EogThumbViewClass EogThumbViewClass;
39 typedef struct _EogThumbViewPrivate EogThumbViewPrivate;
40 
41 typedef enum {
42 	EOG_THUMB_VIEW_SELECT_CURRENT = 0,
43 	EOG_THUMB_VIEW_SELECT_LEFT,
44 	EOG_THUMB_VIEW_SELECT_RIGHT,
45 	EOG_THUMB_VIEW_SELECT_FIRST,
46 	EOG_THUMB_VIEW_SELECT_LAST,
47 	EOG_THUMB_VIEW_SELECT_RANDOM
48 } EogThumbViewSelectionChange;
49 
50 struct _EogThumbView {
51 	GtkIconView icon_view;
52 	EogThumbViewPrivate *priv;
53 };
54 
55 struct _EogThumbViewClass {
56 	 GtkIconViewClass icon_view_class;
57 };
58 
59 GType       eog_thumb_view_get_type 		    (void) G_GNUC_CONST;
60 
61 GtkWidget  *eog_thumb_view_new 			    (void);
62 
63 void	    eog_thumb_view_set_model 		    (EogThumbView *thumbview,
64 						     EogListStore *store);
65 
66 void        eog_thumb_view_set_item_height          (EogThumbView *thumbview,
67 						     gint          height);
68 
69 guint	    eog_thumb_view_get_n_selected 	    (EogThumbView *thumbview);
70 
71 EogImage   *eog_thumb_view_get_first_selected_image (EogThumbView *thumbview);
72 
73 GList      *eog_thumb_view_get_selected_images 	    (EogThumbView *thumbview);
74 
75 void        eog_thumb_view_select_single 	    (EogThumbView *thumbview,
76 						     EogThumbViewSelectionChange change);
77 
78 void        eog_thumb_view_set_current_image	    (EogThumbView *thumbview,
79 						     EogImage     *image,
80 						     gboolean     deselect_other);
81 
82 void        eog_thumb_view_set_thumbnail_popup      (EogThumbView *thumbview,
83 						     GtkMenu      *menu);
84 
85 G_END_DECLS
86 
87 #endif /* EOG_THUMB_VIEW_H */
88