/export/PyOpenColorIO/PyOpenColorIO.h

http://github.com/imageworks/OpenColorIO · C Header · 98 lines · 47 code · 13 blank · 38 comment · 0 complexity · 910114f92a57f8b6a029b510c9750ccb MD5 · raw file

  1. /*
  2. Copyright (c) 2003-2010 Sony Pictures Imageworks Inc., et al.
  3. All Rights Reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. * Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. * Neither the name of Sony Pictures Imageworks nor the names of its
  13. contributors may be used to endorse or promote products derived from
  14. this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  16. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  17. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  18. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  19. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  21. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  22. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  23. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  25. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. #ifndef INCLUDED_PYOCIO_PYOCIO_H
  28. #define INCLUDED_PYOCIO_PYOCIO_H
  29. #include <Python.h>
  30. #include <OpenColorIO/OpenColorIO.h>
  31. OCIO_NAMESPACE_ENTER
  32. {
  33. // ColorSpace
  34. PyObject * BuildConstPyColorSpace(ConstColorSpaceRcPtr colorSpace);
  35. PyObject * BuildEditablePyColorSpace(ColorSpaceRcPtr colorSpace);
  36. bool IsPyColorSpace(PyObject * pyobject);
  37. bool IsPyColorSpaceEditable(PyObject * pyobject);
  38. ConstColorSpaceRcPtr GetConstColorSpace(PyObject * pyobject, bool allowCast);
  39. ColorSpaceRcPtr GetEditableColorSpace(PyObject * pyobject);
  40. // Config
  41. PyObject * BuildConstPyConfig(ConstConfigRcPtr config);
  42. PyObject * BuildEditablePyConfig(ConfigRcPtr config);
  43. bool IsPyConfig(PyObject * config);
  44. bool IsPyConfigEditable(PyObject * config);
  45. ConstConfigRcPtr GetConstConfig(PyObject * config, bool allowCast);
  46. ConfigRcPtr GetEditableConfig(PyObject * config);
  47. // Context
  48. PyObject * BuildConstPyContext(ConstContextRcPtr context);
  49. PyObject * BuildEditablePyContext(ContextRcPtr context);
  50. bool IsPyContext(PyObject * config);
  51. bool IsPyContextEditable(PyObject * config);
  52. ConstContextRcPtr GetConstContext(PyObject * context, bool allowCast);
  53. ContextRcPtr GetEditableContext(PyObject * context);
  54. // Exception
  55. // Warning: these cannot return valid PyObject pointers before
  56. // the python module has been initialized. Beware of calling these
  57. // at static construction time.
  58. PyObject * GetExceptionPyType();
  59. PyObject * GetExceptionMissingFilePyType();
  60. // Processor
  61. PyObject * BuildConstPyProcessor(ConstProcessorRcPtr processor);
  62. bool IsPyProcessor(PyObject * pyobject);
  63. ConstProcessorRcPtr GetConstProcessor(PyObject * pyobject);
  64. // ProcessorMetadata
  65. PyObject * BuildConstPyProcessorMetadata(ConstProcessorMetadataRcPtr metadata);
  66. bool IsPyProcessorMetadata(PyObject * pyobject);
  67. ConstProcessorMetadataRcPtr GetConstProcessorMetadata(PyObject * pyobject);
  68. // Transform
  69. PyObject * BuildConstPyTransform(ConstTransformRcPtr transform);
  70. PyObject * BuildEditablePyTransform(TransformRcPtr transform);
  71. bool IsPyTransform(PyObject * pyobject);
  72. bool IsPyTransformEditable(PyObject * pyobject);
  73. ConstTransformRcPtr GetConstTransform(PyObject * pyobject, bool allowCast);
  74. TransformRcPtr GetEditableTransform(PyObject * pyobject);
  75. // Look
  76. PyObject * BuildConstPyLook(ConstLookRcPtr look);
  77. PyObject * BuildEditablePyLook(LookRcPtr look);
  78. bool IsPyLook(PyObject * pyobject);
  79. bool IsPyLookEditable(PyObject * pyobject);
  80. ConstLookRcPtr GetConstLook(PyObject * pyobject, bool allowCast);
  81. LookRcPtr GetEditableLook(PyObject * pyobject);
  82. }
  83. OCIO_NAMESPACE_EXIT
  84. #endif