basic.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* A few basic types needed everywhere.
  2. *
  3. * 27/10/11
  4. * - from type.h
  5. */
  6. /*
  7. This file is part of VIPS.
  8. VIPS is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU Lesser General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. 02110-1301 USA
  20. */
  21. /*
  22. These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  23. */
  24. #ifndef VIPS_BASIC_H
  25. #define VIPS_BASIC_H
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /*__cplusplus*/
  29. /**
  30. * VipsPel:
  31. *
  32. * A picture element. Cast this to whatever the associated VipsBandFormat says
  33. * to get the value.
  34. */
  35. typedef unsigned char VipsPel;
  36. /* Also used for eg. vips_local() and friends.
  37. */
  38. typedef int (*VipsCallbackFn)( void *a, void *b );
  39. /* Like GFunc, but return a value.
  40. */
  41. typedef void *(*VipsSListMap2Fn)( void *item,
  42. void *a, void *b );
  43. typedef void *(*VipsSListMap4Fn)( void *item,
  44. void *a, void *b, void *c, void *d );
  45. typedef void *(*VipsSListFold2Fn)( void *item,
  46. void *a, void *b, void *c );
  47. typedef enum {
  48. VIPS_PRECISION_INTEGER,
  49. VIPS_PRECISION_FLOAT,
  50. VIPS_PRECISION_APPROXIMATE,
  51. VIPS_PRECISION_LAST
  52. } VipsPrecision;
  53. /* Just for testing.
  54. */
  55. char *vips_path_filename7( const char *path );
  56. char *vips_path_mode7( const char *path );
  57. struct _VipsImage;
  58. typedef struct _VipsImage VipsImage;
  59. struct _VipsRegion;
  60. typedef struct _VipsRegion VipsRegion;
  61. #ifdef __cplusplus
  62. }
  63. #endif /*__cplusplus*/
  64. #endif /*VIPS_BASIC_H*/