gimpthumb-utils.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* LIBGIMP - The GIMP Library
  2. * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3. *
  4. * Thumbnail handling according to the Thumbnail Managing Standard.
  5. * https://specifications.freedesktop.org/thumbnail-spec/
  6. *
  7. * Copyright (C) 2001-2003 Sven Neumann <sven@gimp.org>
  8. * Michael Natterer <mitch@gimp.org>
  9. *
  10. * This library is free software: you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 3 of the License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library. If not, see
  22. * <https://www.gnu.org/licenses/>.
  23. */
  24. #if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION)
  25. #error "Only <libgimpthumb/gimpthumb.h> can be included directly."
  26. #endif
  27. #ifndef __GIMP_THUMB_UTILS_H__
  28. #define __GIMP_THUMB_UTILS_H__
  29. G_BEGIN_DECLS
  30. gboolean gimp_thumb_init (const gchar *creator,
  31. const gchar *thumb_basedir);
  32. const gchar * gimp_thumb_get_thumb_base_dir (void);
  33. gchar * gimp_thumb_find_thumb (const gchar *uri,
  34. GimpThumbSize *size) G_GNUC_MALLOC;
  35. GimpThumbFileType gimp_thumb_file_test (const gchar *filename,
  36. gint64 *mtime,
  37. gint64 *size,
  38. gint *err_no);
  39. gchar * gimp_thumb_name_from_uri (const gchar *uri,
  40. GimpThumbSize size) G_GNUC_MALLOC;
  41. const gchar * gimp_thumb_get_thumb_dir (GimpThumbSize size);
  42. gboolean gimp_thumb_ensure_thumb_dir (GimpThumbSize size,
  43. GError **error);
  44. void gimp_thumbs_delete_for_uri (const gchar *uri);
  45. gchar * gimp_thumb_name_from_uri_local (const gchar *uri,
  46. GimpThumbSize size) G_GNUC_MALLOC;
  47. gchar * gimp_thumb_get_thumb_dir_local (const gchar *dirname,
  48. GimpThumbSize size) G_GNUC_MALLOC;
  49. gboolean gimp_thumb_ensure_thumb_dir_local (const gchar *dirname,
  50. GimpThumbSize size,
  51. GError **error);
  52. void gimp_thumbs_delete_for_uri_local (const gchar *uri);
  53. /* for internal use only */
  54. G_GNUC_INTERNAL void _gimp_thumbs_delete_others (const gchar *uri,
  55. GimpThumbSize size);
  56. G_GNUC_INTERNAL gchar * _gimp_thumb_filename_from_uri (const gchar *uri);
  57. G_END_DECLS
  58. #endif /* __GIMP_THUMB_UTILS_H__ */