gimpdatafiles.h 2.27 KB
Newer Older
1 2
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
Elliot Lee's avatar
Elliot Lee committed
3 4 5 6
 *
 * Datafiles module copyight (C) 1996 Federico Mena Quintero
 * federico@nuclecu.unam.mx
 *
7
 * This library is free software: you can redistribute it and/or
8 9
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
10
 * version 3 of the License, or (at your option) any later version.
Elliot Lee's avatar
Elliot Lee committed
11
 *
12
 * This library is distributed in the hope that it will be useful,
Elliot Lee's avatar
Elliot Lee committed
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
Elliot Lee's avatar
Elliot Lee committed
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
19
 * <https://www.gnu.org/licenses/>.
Elliot Lee's avatar
Elliot Lee committed
20 21
 */

22 23 24 25
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif

26 27
#ifndef __GIMP_DATAFILES_H__
#define __GIMP_DATAFILES_H__
Elliot Lee's avatar
Elliot Lee committed
28

29
#include <time.h>
Sven Neumann's avatar
Sven Neumann committed
30

31 32
G_BEGIN_DECLS

33

34 35 36
/**
 * GimpDatafileData:
 * @filename: the data file's full path.
37
 * @dirname:  the folder the data file is in.
38 39 40 41 42 43 44 45 46
 * @basename: the data file's basename.
 * @atime:    the last time the file was accessed for reading.
 * @mtime:    the last time the file was modified.
 * @ctime:    the time the file was created.
 *
 * This structure is passed to the #GimpDatafileLoaderFunc given to
 * gimp_datafiles_read_directories() for each file encountered in the
 * data path.
 **/
47
struct _GimpDatafileData
48
{
49
  const gchar *filename;
50
  const gchar *dirname;
51
  const gchar *basename;
52 53 54 55 56

  time_t       atime;
  time_t       mtime;
  time_t       ctime;
};
57

Elliot Lee's avatar
Elliot Lee committed
58

59
GIMP_DEPRECATED
60
gboolean   gimp_datafiles_check_extension  (const gchar            *filename,
Sven Neumann's avatar
Sven Neumann committed
61
                                            const gchar            *extension);
62

63
GIMP_DEPRECATED_FOR(GFileEnumerator)
64
void       gimp_datafiles_read_directories (const gchar            *path_str,
Sven Neumann's avatar
Sven Neumann committed
65 66 67
                                            GFileTest               flags,
                                            GimpDatafileLoaderFunc  loader_func,
                                            gpointer                user_data);
Elliot Lee's avatar
Elliot Lee committed
68

Sven Neumann's avatar
Sven Neumann committed
69

70 71
G_END_DECLS

72
#endif  /*  __GIMP_DATAFILES_H__ */