ilcontext.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: ilcontext.h /main/3 1995/10/23 15:44:04 rswiston $ */
  24. #ifndef ILCONTEXT_H
  25. #define ILCONTEXT_H
  26. /* Defines what a context looks like internally.
  27. */
  28. #ifndef ILINT_H
  29. #include "ilint.h"
  30. #endif
  31. /* Internal view of the context, i.e. the public type "ilContext". */
  32. /* Indices into ilContextRec.pAlloc */
  33. #define IL_CONTEXT_ALLOC_EFS 0 /* owned by /ilc/ilefs.c */
  34. #define IL_CONTEXT_MAX_ALLOC 4 /* max # of above pAlloc indices */
  35. typedef struct {
  36. ilContextPublicRec p; /* public view of context, /ilinc/il.h */
  37. /* Owned fields - if you are accessing them outside of the named
  38. owning file, you're doing something wrong!
  39. */
  40. ilPtr pImageData; /* owned by /ilc/ilimage.c */
  41. unsigned int privateType; /* owned by /ilc/ilcontext.c */
  42. ilObjectRec objectHead; /* owned by /ilc/ilobject.c */
  43. ilPtr pXData; /* owned by /ilc/ilX.c */
  44. /* Array of ptrs which if non-null are freed _after_ all objects destroyed. */
  45. ilPtr pAlloc [IL_CONTEXT_MAX_ALLOC];
  46. } ilContextRec, *ilContextPtr;
  47. /* Typecast the given ptr to an ilContextPtr. The given ptr should be an
  48. ilContext; this macro does not check.
  49. */
  50. #define IL_CONTEXT_PTR(_context) ((ilContextPtr)_context)
  51. #endif