Package ch.bailu.gtk.pango
Class Color
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.pango.Color
- All Implemented Interfaces:
PointerInterface
The `PangoColor` structure is used to
represent a color in an uncalibrated RGB color-space.
represent a color in an uncalibrated RGB color-space.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a copy of @src.void
free()
Frees a color allocated by [method@Pango.Color.copy].static ClassHandler
int
value of blue componentint
value of green componentint
value of red componentstatic int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
Fill in the fields of a color from a string specification.boolean
Fill in the fields of a color from a string specification.void
setFieldBlue
(int blue) value of blue componentvoid
setFieldGreen
(int green) value of green componentvoid
setFieldRed
(int red) value of red componenttoStr()
Returns a textual specification of @color.Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
RED
value of red component- See Also:
-
GREEN
value of green component- See Also:
-
BLUE
value of blue component- See Also:
-
-
Constructor Details
-
Color
-
Color
public Color()
-
-
Method Details
-
getClassHandler
-
setFieldRed
public void setFieldRed(int red) value of red component -
getFieldRed
public int getFieldRed()value of red component -
setFieldGreen
public void setFieldGreen(int green) value of green component -
getFieldGreen
public int getFieldGreen()value of green component -
setFieldBlue
public void setFieldBlue(int blue) value of blue component -
getFieldBlue
public int getFieldBlue()value of blue component -
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).- Returns:
- the newly allocated `PangoColor`, which should be freed with [method@Pango.Color.free]
-
free
public void free()Frees a color allocated by [method@Pango.Color.copy]. -
parse
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](https://www.w3.org/TR/css-color-4/#named-colors),
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`.)- Parameters:
spec
- a string specifying the new color- Returns:
- %TRUE if parsing of the specifier succeeded, otherwise %FALSE
-
parse
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](https://www.w3.org/TR/css-color-4/#named-colors),
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`.)- Parameters:
spec
- a string specifying the new color- Returns:
- %TRUE if parsing of the specifier succeeded, otherwise %FALSE
-
toStr
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.- Returns:
- a newly-allocated text string that must be freed with g_free().
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-