gimpscanner.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* LIBGIMP - The GIMP Library
  2. * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3. *
  4. * gimpscanner.h
  5. * Copyright (C) 2002 Sven Neumann <sven@gimp.org>
  6. * Michael Natterer <mitch@gimp.org>
  7. *
  8. * This library is free software: you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Library General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library. If not, see
  20. * <https://www.gnu.org/licenses/>.
  21. */
  22. #if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
  23. #error "Only <libgimpconfig/gimpconfig.h> can be included directly."
  24. #endif
  25. #ifndef __GIMP_SCANNER_H__
  26. #define __GIMP_SCANNER_H__
  27. /**
  28. * GIMP_TYPE_SCANNER:
  29. *
  30. * The type ID of the GIMP scanner type which is a boxed type, used to
  31. * read config files.
  32. *
  33. * Since: 3.0
  34. */
  35. #define GIMP_TYPE_SCANNER (gimp_scnner_get_type ())
  36. GType gimp_scanner_get_type (void) G_GNUC_CONST;
  37. GimpScanner * gimp_scanner_new_file (GFile *file,
  38. GError **error);
  39. GimpScanner * gimp_scanner_new_stream (GInputStream *input,
  40. GError **error);
  41. GimpScanner * gimp_scanner_new_string (const gchar *text,
  42. gint text_len,
  43. GError **error);
  44. GimpScanner * gimp_scanner_ref (GimpScanner *scanner);
  45. void gimp_scanner_unref (GimpScanner *scanner);
  46. gboolean gimp_scanner_parse_token (GimpScanner *scanner,
  47. GTokenType token);
  48. gboolean gimp_scanner_parse_identifier (GimpScanner *scanner,
  49. const gchar *identifier);
  50. gboolean gimp_scanner_parse_string (GimpScanner *scanner,
  51. gchar **dest);
  52. gboolean gimp_scanner_parse_string_no_validate (GimpScanner *scanner,
  53. gchar **dest);
  54. gboolean gimp_scanner_parse_data (GimpScanner *scanner,
  55. gint length,
  56. guint8 **dest);
  57. gboolean gimp_scanner_parse_int (GimpScanner *scanner,
  58. gint *dest);
  59. gboolean gimp_scanner_parse_int64 (GimpScanner *scanner,
  60. gint64 *dest);
  61. gboolean gimp_scanner_parse_float (GimpScanner *scanner,
  62. gdouble *dest);
  63. gboolean gimp_scanner_parse_boolean (GimpScanner *scanner,
  64. gboolean *dest);
  65. gboolean gimp_scanner_parse_color (GimpScanner *scanner,
  66. GeglColor **color);
  67. gboolean gimp_scanner_parse_matrix2 (GimpScanner *scanner,
  68. GimpMatrix2 *dest);
  69. #endif /* __GIMP_SCANNER_H__ */