Class CicpParams

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class CicpParams extends GObject

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
  • Constructor Details

    • CicpParams

      public CicpParams(MemorySegment address)
      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

      public static @Nullable Type getType()
      Get the GType of the CicpParams class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected CicpParams asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • buildColorState

      public ColorState buildColorState() throws GErrorException

      Creates a new GdkColorState object for the cicp parameters in self.

      Note that this may fail if the cicp parameters in this CicpParams are not supported by GTK. In that case, NULL is returned, and error is set with an error message that can be presented to the user.

      Returns:
      A newly allocated GdkColorState
      Throws:
      GErrorException - see GError
      Since:
      4.16
    • getColorPrimaries

      public int getColorPrimaries()
      Returns the value of the color-primaries property of self.
      Returns:
      the color-primaries value
      Since:
      4.16
    • getMatrixCoefficients

      public int getMatrixCoefficients()
      Gets the matrix-coefficients property of self.
      Returns:
      the matrix-coefficients value
      Since:
      4.16
    • getRange

      public CicpRange getRange()
      Gets the range property of self.
      Returns:
      the range value
      Since:
      4.16
    • getTransferFunction

      public int getTransferFunction()
      Gets the transfer-function property of self.
      Returns:
      the transfer-function value
      Since:
      4.16
    • setColorPrimaries

      public void setColorPrimaries(int colorPrimaries)
      Sets the color-primaries property of self.
      Parameters:
      colorPrimaries - the new color primaries value
      Since:
      4.16
    • setMatrixCoefficients

      public void setMatrixCoefficients(int matrixCoefficients)
      this CicpParams a GdkCicpParams Sets the matrix-coefficients property of self.
      Parameters:
      matrixCoefficients - the new matrix-coefficients value
      Since:
      4.16
    • setRange

      public void setRange(CicpRange range)
      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 of self.
      Parameters:
      transferFunction - the new transfer-function value
      Since:
      4.16
    • builder

      public static CicpParams.Builder<? extends CicpParams.Builder> builder()
      A CicpParams.Builder object constructs a CicpParams with the specified properties. Use the various set...() methods to set properties, and finish construction with CicpParams.Builder.build().
      Returns:
      the builder object