gtkmm 4.16.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gdk::ColorState Class Referencefinal

A Gdk::ColorState object provides the information to interpret colors and pixels in a variety of ways. More...

#include <gdkmm/colorstate.h>

Public Member Functions

void reference () const
 Increment the reference count for this object.
 
void unreference () const
 Decrement the reference count for this object.
 
GdkColorState * gobj ()
 Provides access to the underlying C instance.
 
const GdkColorState * gobj () const
 Provides access to the underlying C instance.
 
GdkColorState * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
 ColorState ()=delete
 
 ColorState (const ColorState &)=delete
 
ColorStateoperator= (const ColorState &)=delete
 
bool equal (const Glib::RefPtr< const ColorState > & other) const
 Compares two Gdk::ColorStates for equality.
 
Glib::RefPtr< CicpParamscreate_cicp_params () const
 Create a Gdk::CicpParams representing the colorstate.
 

Static Public Member Functions

static Glib::RefPtr< ColorStateget_srgb ()
 Returns the color state object representing the sRGB color space.
 
static Glib::RefPtr< ColorStateget_srgb_linear ()
 Returns the color state object representing the linearized sRGB color space.
 
static Glib::RefPtr< ColorStateget_rec2100_pq ()
 Returns the color state object representing the rec2100-pq color space.
 
static Glib::RefPtr< ColorStateget_rec2100_linear ()
 Returns the color state object representing the linear rec2100 color space.
 

Protected Member Functions

void operator delete (void *, std::size_t)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gdk::ColorStatewrap (GdkColorState * object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Detailed Description

A Gdk::ColorState object provides the information to interpret colors and pixels in a variety of ways.

They are also known as color spaces.

Crucially, GTK knows how to convert colors from one color state to another.

ColorState objects are immutable and therefore threadsafe.

Since gtkmm 4.16:

Constructor & Destructor Documentation

◆ ColorState() [1/2]

Gdk::ColorState::ColorState ( )
delete

◆ ColorState() [2/2]

Gdk::ColorState::ColorState ( const ColorState )
delete

Member Function Documentation

◆ create_cicp_params()

Glib::RefPtr< CicpParams > Gdk::ColorState::create_cicp_params ( ) const

Create a Gdk::CicpParams representing the colorstate.

It is not guaranteed that every Gdk::ColorState can be represented with Cicp parameters. If that is the case, this function returns nullptr.

Since gtkmm 4.16:
Returns
A new Gdk::CicpParams.

◆ equal()

bool Gdk::ColorState::equal ( const Glib::RefPtr< const ColorState > &  other) const

Compares two Gdk::ColorStates for equality.

Note that this function is not guaranteed to be perfect and two objects describing the same color state may compare not equal. However, different color states will never compare equal.

Since gtkmm 4.16:
Parameters
otherAnother Gdk::ColorStatee.
Returns
true if the two color states compare equal.

◆ get_rec2100_linear()

static Glib::RefPtr< ColorState > Gdk::ColorState::get_rec2100_linear ( )
static

Returns the color state object representing the linear rec2100 color space.

This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and a linear transfer function.

It is equivalent to the Cicp tuple 9/8/0/1.

See e.g. the CSS HDR Module for details about this colorstate.

Since gtkmm 4.16:
Returns
The color state object for linearized rec2100.

◆ get_rec2100_pq()

static Glib::RefPtr< ColorState > Gdk::ColorState::get_rec2100_pq ( )
static

Returns the color state object representing the rec2100-pq color space.

This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and the transfer function defined by SMPTE ST 2084 and BT.2100-2.

It is equivalent to the Cicp tuple 9/16/0/1.

See e.g. the CSS HDR Module for details about this colorstate.

Since gtkmm 4.16:
Returns
The color state object for rec2100-pq.

◆ get_srgb()

static Glib::RefPtr< ColorState > Gdk::ColorState::get_srgb ( )
static

Returns the color state object representing the sRGB color space.

This color state uses the primaries defined by BT.709-6 and the transfer function defined by IEC 61966-2-1.

It is equivalent to the Cicp tuple 1/13/0/1.

See e.g. the CSS Color Module for details about this colorstate.

Since gtkmm 4.16:
Returns
The color state object for sRGB.

◆ get_srgb_linear()

static Glib::RefPtr< ColorState > Gdk::ColorState::get_srgb_linear ( )
static

Returns the color state object representing the linearized sRGB color space.

This color state uses the primaries defined by BT.709-6 and a linear transfer function.

It is equivalent to the Cicp tuple 1/8/0/1.

See e.g. the CSS Color Module for details about this colorstate.

Since gtkmm 4.16:
Returns
The color state object for linearized sRGB.

◆ gobj() [1/2]

GdkColorState * Gdk::ColorState::gobj ( )

Provides access to the underlying C instance.

◆ gobj() [2/2]

const GdkColorState * Gdk::ColorState::gobj ( ) const

Provides access to the underlying C instance.

◆ gobj_copy()

GdkColorState * Gdk::ColorState::gobj_copy ( ) const

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator delete()

void Gdk::ColorState::operator delete ( void *  ,
std::size_t   
)
protected

◆ operator=()

ColorState & Gdk::ColorState::operator= ( const ColorState )
delete

◆ reference()

void Gdk::ColorState::reference ( ) const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

◆ unreference()

void Gdk::ColorState::unreference ( ) const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gdk::ColorState > wrap ( GdkColorState *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.