Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PangoColor

[30:7] extends: object

The PangoColor structure is used to represent a color in an uncalibrated RGB color-space.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PangoColor (Handle = null)

    Creates a new Color by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • copy ()

    Creates a copy of @src. The copy should be freed with [method@Pango.Color.free]. Primarily used by language bindings, not that useful otherwise (since colors can just be copied by assignment in C).

    • @r the newly allocated PangoColor, which should be freed with [method@Pango.Color.free].
  • free ()

    Frees a color allocated by [method@Pango.Color.copy].

    • @r None.
  • parse (string spec)

    Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the CSS Color specification, or it can be a value in the form #rgb, #rrggbb, #rrrgggbbb or #rrrrggggbbbb, where r, g and b are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is #fff, #ffffff, #fffffffff and #ffffffffffff.)

    • @p spec is a string specifying the new color.
    • @r %TRUE if parsing of the specifier succeeded, otherwise %FALSE.
  • parse_with_alpha (string spec)

    Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the CSS Color specification, or it can be a hexadecimal value in the form #rgb, #rrggbb, #rrrgggbbb or #rrrrggggbbbb where r, g and b are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is #fff, #ffffff, #fffffffff and #ffffffffffff.) Additionally, parse strings of the form #rgba, #rrggbbaa, #rrrrggggbbbbaaaa, if

    • @alpha is not %NULL, and set @alpha to the value specified by the hex digits for a. If no alpha component is found in @spec, @alpha is set to 0xffff (for a solid color).
    • @p alpha is return location for alpha.
    • @p spec is a string specifying the new color.
    • @r %TRUE if parsing of the specifier succeeded, otherwise %FALSE.
  • to_string ()

    Returns a textual specification of @color. The string is in the hexadecimal form #rrrrggggbbbb, where r, g and b are hex digits representing the red, green, and blue components respectively.

    • @r a newly-allocated text string that must be freed with g_free()..

class: PangoColorLayout

[12:14] static extends: object

Generated struct layout helper for GIR record Color.

Methods

  • layout ()

    Returns the Panama struct layout for Color.