1 /*
2 Copyright (c) 2003-2010 Sony Pictures Imageworks Inc., et al.
3 All Rights Reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
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.
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
29 package org.OpenColorIO;
30 import org.OpenColorIO.*;
31 
32 public class Config extends LoadLibrary
33 {
Config()34     public Config() { super(); }
Config(long impl)35     protected Config(long impl) { super(impl); }
dispose()36     public native void dispose();
finalize()37     protected void finalize() { dispose(); }
Create()38     public native Config Create();
CreateFromEnv()39     public native Config CreateFromEnv();
CreateFromFile(String filename)40     public native Config CreateFromFile(String filename);
CreateFromStream(String istream)41     public native Config CreateFromStream(String istream);
createEditableCopy()42     public native Config createEditableCopy();
sanityCheck()43     public native void sanityCheck();
getDescription()44     public native String getDescription();
setDescription(String description)45     public native void setDescription(String description);
serialize()46     public native String serialize();
getCacheID()47     public native String getCacheID();
getCacheID(Context context)48     public native String getCacheID(Context context);
getCurrentContext()49     public native Context getCurrentContext();
addEnvironmentVar(String name, String defaultValue)50     public native void addEnvironmentVar(String name, String defaultValue);
getNumEnvironmentVars()51     public native int getNumEnvironmentVars();
getEnvironmentVarNameByIndex(int index)52     public native String getEnvironmentVarNameByIndex(int index);
getEnvironmentVarDefault(String name)53     public native String getEnvironmentVarDefault(String name);
clearEnvironmentVars()54     public native void clearEnvironmentVars();
getSearchPath()55     public native String getSearchPath();
setSearchPath(String path)56     public native void setSearchPath(String path);
getWorkingDir()57     public native String getWorkingDir();
setWorkingDir(String dirname)58     public native void setWorkingDir(String dirname);
getNumColorSpaces()59     public native int getNumColorSpaces();
getColorSpaceNameByIndex(int index)60     public native String getColorSpaceNameByIndex(int index);
getColorSpace(String name)61     public native ColorSpace getColorSpace(String name);
getIndexForColorSpace(String name)62     public native int getIndexForColorSpace(String name);
addColorSpace(ColorSpace cs)63     public native void addColorSpace(ColorSpace cs);
clearColorSpaces()64     public native void clearColorSpaces();
parseColorSpaceFromString(String str)65     public native String parseColorSpaceFromString(String str);
isStrictParsingEnabled()66     public native boolean isStrictParsingEnabled();
setStrictParsingEnabled(boolean enabled)67     public native void setStrictParsingEnabled(boolean enabled);
setRole(String role, String colorSpaceName)68     public native void setRole(String role, String colorSpaceName);
getNumRoles()69     public native int getNumRoles();
hasRole(String role)70     public native boolean hasRole(String role);
getRoleName(int index)71     public native String getRoleName(int index);
getDefaultDisplay()72     public native String getDefaultDisplay();
getNumDisplays()73     public native int getNumDisplays();
getDisplay(int index)74     public native String getDisplay(int index);
getDefaultView(String display)75     public native String getDefaultView(String display);
getNumViews(String display)76     public native int getNumViews(String display);
getView(String display, int index)77     public native String getView(String display, int index);
getDisplayColorSpaceName(String display, String view)78     public native String getDisplayColorSpaceName(String display, String view);
getDisplayLooks(String display, String view)79     public native String getDisplayLooks(String display, String view);
80     // TODO: seems that 4 string params causes a memory error in the JNI layer?
81     // public native void addDisplay(String display, String view, String colorSpaceName, int looks);
clearDisplays()82     public native void clearDisplays();
setActiveDisplays(String displays)83     public native void setActiveDisplays(String displays);
getActiveDisplays()84     public native String getActiveDisplays();
setActiveViews(String views)85     public native void setActiveViews(String views);
getActiveViews()86     public native String getActiveViews();
getDefaultLumaCoefs(float[] rgb)87     public native void getDefaultLumaCoefs(float[] rgb);
setDefaultLumaCoefs(float[] rgb)88     public native void setDefaultLumaCoefs(float[] rgb);
getLook(String name)89     public native Look getLook(String name);
getNumLooks()90     public native int getNumLooks();
getLookNameByIndex(int index)91     public native String getLookNameByIndex(int index);
addLook(Look look)92     public native void addLook(Look look);
clearLooks()93     public native void clearLooks();
getProcessor(Context context, ColorSpace srcColorSpace, ColorSpace dstColorSpace)94     public native Processor getProcessor(Context context, ColorSpace srcColorSpace, ColorSpace dstColorSpace);
getProcessor(ColorSpace srcColorSpace, ColorSpace dstColorSpace)95     public native Processor getProcessor(ColorSpace srcColorSpace, ColorSpace dstColorSpace);
getProcessor(String srcName, String dstName)96     public native Processor getProcessor(String srcName, String dstName);
getProcessor(Context context, String srcName, String dstName)97     public native Processor getProcessor(Context context, String srcName, String dstName);
getProcessor(Transform transform)98     public native Processor getProcessor(Transform transform);
getProcessor(Transform transform, TransformDirection direction)99     public native Processor getProcessor(Transform transform, TransformDirection direction);
getProcessor(Context context, Transform transform, TransformDirection direction)100     public native Processor getProcessor(Context context, Transform transform, TransformDirection direction);
101 }
102