Class CicpParams
- All Implemented Interfaces:
Proxy
Contains the parameters that define a colorstate with cicp parameters.
Cicp parameters are specified in the ITU-T H.273 specification.
See the documentation of individual properties for supported values.
The 'unspecified' value (2) is not treated in any special way, and must be replaced by a different value before creating a color state.
GdkCicpParams can be used as a builder object to construct a color
state from Cicp data with buildColorState().
The function will return an error if the given parameters are not
supported.
You can obtain a GdkCicpParams object from a color state with
ColorState.createCicpParams(). This can be used to
create a variant of a color state, by changing just one of the cicp
parameters, or just to obtain information about the color state.
- Since:
- 4.16
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCicpParams.Builder<B extends CicpParams.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new CicpParams.CicpParams(MemorySegment address) Create a CicpParams instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected CicpParamsasParent()Return this instance as if it were its parent type.Creates a newGdkColorStateobject for the cicp parameters inself.static CicpParams.Builder<? extends CicpParams.Builder> builder()ACicpParams.Builderobject constructs aCicpParamswith the specified properties.intReturns the value of the color-primaries property ofself.intGets the matrix-coefficients property ofself.static MemoryLayoutThe memory layout of the native struct.getRange()Gets the range property ofself.intGets the transfer-function property ofself.static @Nullable TypegetType()Get the GType of the CicpParams class.voidsetColorPrimaries(int colorPrimaries) Sets the color-primaries property ofself.voidsetMatrixCoefficients(int matrixCoefficients) this CicpParams aGdkCicpParamsSets the matrix-coefficients property ofself.voidSets the range property of this CicpParamsvoidsetTransferFunction(int transferFunction) Sets the transfer-function property ofself.Methods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
CicpParams
Create a CicpParams instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
CicpParams
public CicpParams()Create a new CicpParams.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
buildColorState
Creates a new
GdkColorStateobject for the cicp parameters inself.Note that this may fail if the cicp parameters in this CicpParams are not supported by GTK. In that case,
NULLis returned, anderroris set with an error message that can be presented to the user.- Returns:
- A newly allocated
GdkColorState - Throws:
GErrorException- seeGError- Since:
- 4.16
-
getColorPrimaries
public int getColorPrimaries()Returns the value of the color-primaries property ofself.- Returns:
- the color-primaries value
- Since:
- 4.16
-
getMatrixCoefficients
public int getMatrixCoefficients()Gets the matrix-coefficients property ofself.- Returns:
- the matrix-coefficients value
- Since:
- 4.16
-
getRange
-
getTransferFunction
public int getTransferFunction()Gets the transfer-function property ofself.- Returns:
- the transfer-function value
- Since:
- 4.16
-
setColorPrimaries
public void setColorPrimaries(int colorPrimaries) Sets the color-primaries property ofself.- Parameters:
colorPrimaries- the new color primaries value- Since:
- 4.16
-
setMatrixCoefficients
public void setMatrixCoefficients(int matrixCoefficients) this CicpParams aGdkCicpParamsSets the matrix-coefficients property ofself.- Parameters:
matrixCoefficients- the new matrix-coefficients value- Since:
- 4.16
-
setRange
Sets the range property of this CicpParams- Parameters:
range- the range value- Since:
- 4.16
-
setTransferFunction
public void setTransferFunction(int transferFunction) Sets the transfer-function property ofself.- Parameters:
transferFunction- the new transfer-function value- Since:
- 4.16
-
builder
ACicpParams.Builderobject constructs aCicpParamswith the specified properties. Use the variousset...()methods to set properties, and finish construction withCicpParams.Builder.build().- Returns:
- the builder object
-