dfiff.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org)
  3. (c) Copyright 2000-2004 Convergence (integrated media) GmbH
  4. All rights reserved.
  5. Written by Denis Oliver Kropp <dok@directfb.org>,
  6. Andreas Hundt <andi@fischlustig.de>,
  7. Sven Neumann <neo@directfb.org>,
  8. Ville Syrjälä <syrjala@sci.fi> and
  9. Claudio Ciccani <klan@users.sf.net>.
  10. This file is subject to the terms and conditions of the MIT License:
  11. Permission is hereby granted, free of charge, to any person
  12. obtaining a copy of this software and associated documentation
  13. files (the "Software"), to deal in the Software without restriction,
  14. including without limitation the rights to use, copy, modify, merge,
  15. publish, distribute, sublicense, and/or sell copies of the Software,
  16. and to permit persons to whom the Software is furnished to do so,
  17. subject to the following conditions:
  18. The above copyright notice and this permission notice shall be
  19. included in all copies or substantial portions of the Software.
  20. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  23. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  24. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  25. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  26. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  27. */
  28. #ifndef __DFIFF_H__
  29. #define __DFIFF_H__
  30. #include <inttypes.h>
  31. #define DFIFF_FLAG_LITTLE_ENDIAN 0x01
  32. typedef struct {
  33. unsigned char magic[5]; /* "DFIFF" magic */
  34. unsigned char major; /* Major version number */
  35. unsigned char minor; /* Minor version number */
  36. unsigned char flags; /* Some flags like endianess */
  37. /* From now on endianess matters... */
  38. uint32_t width;
  39. uint32_t height;
  40. DFBSurfacePixelFormat format;
  41. uint32_t pitch;
  42. } DFIFFHeader;
  43. #endif