1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3
* Copyright (C) 2010 ammonkey
5
* This library is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License
7
* version 3.0 as published by the Free Software Foundation.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License version 3.0 for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library. If not, see
16
* <http://www.gnu.org/licenses/>.
18
* Author: ammonkey <am.monkeyd@gmail.com>
25
#include <glib-object.h>
26
#include <gdk-pixbuf/gdk-pixbuf.h>
31
#define GOF_TYPE_FILE (gof_file_get_type ())
32
#define GOF_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOF_TYPE_FILE, GOFFile))
33
#define GOF_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOF_TYPE_FILE, GOFFileClass))
34
#define GOF_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOF_TYPE_FILE))
35
#define GOF_IS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOF_TYPE_FILE))
36
#define GOF_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOF_TYPE_FILE, GOFFileClass))
38
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
39
#define _g_free0(var) (var = (g_free (var), NULL))
41
typedef struct _GOFFile GOFFile;
42
typedef struct _GOFFileClass GOFFileClass;
43
//typedef struct _GOFFilePrivate GOFFilePrivate;
46
GObject parent_instance;
47
//GOFFilePrivate * priv;
49
gboolean parent_directory_link;*/
56
gchar *utf8_collation_key;
60
gboolean is_directory;
67
struct _GOFFileClass {
68
GObjectClass parent_class;
71
GType gof_file_get_type (void);
73
//GOFFile* gof_file_new (GFileInfo* file_info);
74
//GOFFile* gof_file_new (GFileInfo* file_info, GFileEnumerator *enumerator);
75
GOFFile* gof_file_new (GFileInfo* file_info, GFile *dir);
76
GFileInfo* gof_file_get_file_info (GOFFile* self);
77
gint gof_file_NameCompareFunc (GOFFile* a, GOFFile* b);
78
gint gof_file_SizeCompareFunc (GOFFile* a, GOFFile* b);
80
int gof_file_compare_for_sort (GOFFile *file_1,
83
gboolean directories_first,
85
GOFFile* gof_file_ref (GOFFile *file);
86
void gof_file_unref (GOFFile *file);
87
char * gof_file_get_date_as_string (guint64 d);
89
void gof_file_list_unref (GList *list);
90
void gof_file_list_free (GList *list);
93
#endif /* GOF_DIRECTORY_ASYNC_H */