Class CicpParams
- All Implemented Interfaces:
Proxy
GdkCicpParams
struct contains the parameters that define
a colorstate according to 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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
CicpParams.Builder<B extends CicpParams.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionCreates a newGdkCicpParams
object.CicpParams
(MemorySegment address) Create a CicpParams proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected CicpParams
asParent()
Returns this instance as if it were its parent type.Creates a newGdkColorState
object for the cicp parameters in this CicpParams.static CicpParams.Builder
<? extends CicpParams.Builder> builder()
ACicpParams.Builder
object constructs aCicpParams
with the specified properties.int
Returns the value of the color-primaries property of this CicpParams.int
Gets the matrix-coefficients property of this CicpParams.getRange()
Gets the range property of this CicpParams.int
Gets the transfer-function property of this CicpParams.static Type
getType()
Get the GType of the CicpParams classvoid
setColorPrimaries
(int colorPrimaries) Sets the color-primaries property of this CicpParams.void
setMatrixCoefficients
(int matrixCoefficients) this CicpParams aGdkCicpParams
Sets the matrix-coefficients property of this CicpParams.void
Sets the range property of this CicpParamsvoid
setTransferFunction
(int transferFunction) Sets the transfer-function property of this CicpParams.Methods inherited from class org.gnome.gobject.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, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
CicpParams
Create a CicpParams proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
CicpParams
public CicpParams()Creates a newGdkCicpParams
object.The initial values of the properties are the values for "undefined" and need to be set before a color state object can be built.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
buildColorState
Creates a newGdkColorState
object for the cicp parameters in this CicpParams.Note that this may fail if the cicp parameters in this CicpParams are not supported by GTK. In that case,
NULL
is returned, anderror
is set with an error message that can be presented to the user.- Returns:
- A newly allocated
GdkColorState
- Throws:
GErrorException
- seeGError
-
getColorPrimaries
public int getColorPrimaries()Returns the value of the color-primaries property of this CicpParams.- Returns:
- the color-primaries value
-
getMatrixCoefficients
public int getMatrixCoefficients()Gets the matrix-coefficients property of this CicpParams.- Returns:
- the matrix-coefficients value
-
getRange
-
getTransferFunction
public int getTransferFunction()Gets the transfer-function property of this CicpParams.- Returns:
- the transfer-function value
-
setColorPrimaries
public void setColorPrimaries(int colorPrimaries) Sets the color-primaries property of this CicpParams.- Parameters:
colorPrimaries
- the new color primaries value
-
setMatrixCoefficients
public void setMatrixCoefficients(int matrixCoefficients) this CicpParams aGdkCicpParams
Sets the matrix-coefficients property of this CicpParams.- Parameters:
matrixCoefficients
- the new matrix-coefficients value
-
setRange
Sets the range property of this CicpParams- Parameters:
range
- the range value
-
setTransferFunction
public void setTransferFunction(int transferFunction) Sets the transfer-function property of this CicpParams.- Parameters:
transferFunction
- the new transfer-function value
-
builder
ACicpParams.Builder
object constructs aCicpParams
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withCicpParams.Builder.build()
.
-