summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2022-06-13 15:59:12 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2022-06-13 16:33:47 -0400
commit908a5e43bc37ea3b80985683369a27b4e607aecf (patch)
tree5085eda94c2599ab6b5732470d230e79cfb4546b
parent5f809521ad2d1080710670602619582de8fd6b0c (diff)
downloadxorg-lib-libXft-908a5e43bc37ea3b80985683369a27b4e607aecf.tar.gz
add section of functions managing XftColor
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--man/Xft.man132
1 files changed, 114 insertions, 18 deletions
diff --git a/man/Xft.man b/man/Xft.man
index 04f040f..e1563e2 100644
--- a/man/Xft.man
+++ b/man/Xft.man
@@ -714,9 +714,6 @@ and opens the matching font, sizing it correctly for screen number
.I screen
on display
.IR dpy .
-The
-.B Display
-data type is defined by the X11 library.
Return the matched font, or
NULL if no match is found.
.PP
@@ -1007,6 +1004,120 @@ the corresponding entry in
.I extents
is filled with zeroes.
.\" *************************************************************************
+.SS "Managing XftColor"
+.PS
+\fBBool\fP \fBXftColorAllocName\fP (
+ \fBDisplay\fP *\fIdpy\fP,
+ \fB_Xconst Visual\fP *\fIvisual\fP,
+ \fBColormap\fP \fIcmap\fP,
+ \fB_Xconst char\fP *\fIname\fP,
+ \fBXftColor\fP *\fIresult\fP);
+.PE
+Use
+.BR XAllocNamedColor ()
+to look up the named color
+.I name
+for the screen associated with the colormap
+.IR cmap .
+.RS 7
+.bP
+If
+.BR XAllocNamedColor ()
+returns nonzero,
+.BR XftColorAllocName ()
+fills in the resulting
+.B XftColor
+pixel field with the closest color supported by the screen,
+as well as the exact red, green and blue fields from the database,
+and returns True.
+.bP
+If
+.BR XAllocNamedColor ()
+returns zero,
+.BR XftColorAllocName ()
+returns False, and does not update the
+.B XftColor
+referenced by
+.IR result .
+.RE
+.IP
+The
+.I visual
+parameter is unused.
+.PS
+\fBBool\fP \fBXftColorAllocValue\fP (
+ \fBDisplay\fP *\fIdpy\fP,
+ \fBVisual\fP *\fIvisual\fP,
+ \fBColormap\fP \fIcmap\fP,
+ \fB_Xconst XRenderColor\fP *\fIcolor\fP,
+ \fBXftColor\fP *\fIresult\fP);
+.PE
+Allocate a color value:
+.RS 7
+.bP
+If the
+.I visual
+class is TrueColor,
+.BR XftColorAllocValue ()
+sets the
+.I pixel
+field in the
+.B XftColor
+referenced by
+.I result
+using the red, green and blue fields from the
+.I color
+parameter.
+.bP
+If the
+.I visual
+class is not TrueColor,
+.BR XftColorAllocValue ()
+calls
+.BR XAllocColor ()
+to allocate an entry in the colormap
+.IR cmap .
+which returns the
+pixel value of the color closest to the specified RGB elements supported by the
+hardware.
+.IP
+If
+.BR XAllocColor ()
+succeeds
+.BR XftColorAllocValue ()
+stores that pixel value in the
+.B XRenderColor
+referenced by
+.I result
+and returns True.
+.IP
+If
+.BR XAllocColor ()
+fails,
+.BR
+.BR XftColorAllocValue ()
+returns False and does not modify the result.
+.RE
+.PS
+\fBvoid\fP \fBXftColorFree\fP (
+ \fBDisplay\fP *\fIdpy\fP,
+ \fBVisual\fP *\fIvisual\fP,
+ \fBColormap\fP \fIcmap\fP,
+ \fBXftColor\fP *\fIcolor\fP);
+.PE
+If the
+.I visual
+class is not TrueColor,
+.B Xft
+calls
+.BR XFreeColors ()
+to free the entry from the colormap
+.I cmap
+whose pixel value in the
+.I color
+parameter was allocated by
+.BR XftColorAllocName ().
+.\" *************************************************************************
.SS "Managing XftDraw"
.PS
\fBXftDraw\fP *\fBXftDrawCreate\fP (
@@ -1024,13 +1135,6 @@ and
.I colormap
on
.IR display .
-.IP
-The
-.BR Drawable ,
-.BR Visual ,
-and
-.B Colormap
-data types are defined by the X11 library.
.PP
.PS
\fBXftDraw\fP *\fBXftDrawCreateBitmap\fP (
@@ -1041,10 +1145,6 @@ data types are defined by the X11 library.
behaves as
.BR XftDrawCreate (),
except that it uses an X pixmap of color depth 1 instead of an X drawable.
-.IP
-The
-.B Pixmap
-data type is defined by the X11 library.
.PP
.PS
\fBXftDraw *\fP \fBXftDrawCreateAlpha\fP (
@@ -1058,10 +1158,6 @@ behaves as
except that it uses an X pixmap of color depth
.I depth
instead of an X drawable.
-.IP
-The
-.B Pixmap
-data type is defined by the X11 library.
.PP
.PS
\fBvoid\fP \fBXftDrawChange\fP (