1 /*
2  * Copyright © 2009-2018 Siyan Panayotov <contact@siyanpanayotov.com>
3  *
4  * This file is part of Viewnior.
5  *
6  * Viewnior is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Viewnior is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Viewnior.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __VNR_FILE_H__
21 #define __VNR_FILE_H__
22 
23 #include <gtk/gtk.h>
24 
25 G_BEGIN_DECLS
26 
27 #define VNR_TYPE_FILE            (vnr_file_get_type ())
28 #define VNR_FILE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), VNR_TYPE_FILE, VnrFile))
29 #define VNR_FILE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), VNR_TYPE_FILE, VnrFileClass))
30 #define VNR_IS_FILE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VNR_TYPE_FILE))
31 #define VNR_IS_FILE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), VNR_TYPE_FILE))
32 #define VNR_FILE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), VNR_TYPE_FILE, VnrFileClass))
33 
34 typedef struct _VnrFile VnrFile;
35 typedef struct _VnrFileClass VnrFileClass;
36 
37 struct _VnrFile {
38     GObject parent;
39 
40     const gchar *display_name;
41     const gchar *display_name_collate;
42     const gchar *path;
43 };
44 
45 struct _VnrFileClass {
46     GObjectClass parent;
47 };
48 
49 GType   vnr_file_get_type   (void) G_GNUC_CONST;
50 
51 /* Constructors */
52 VnrFile *vnr_file_new ();
53 
54 /* Actions */
55 void    vnr_file_load_uri_list      (GSList *uri_list, GList **file_list, gboolean include_hidden, GError **error);
56 void    vnr_file_load_single_uri    (char *p_uri, GList **file_list, gboolean include_hidden, GError **error);
57 
58 
59 G_END_DECLS
60 #endif /* __VNR_FILE_H__ */
61