PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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