mention "Inherits=" lists

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
Thomas E. Dickey 2021-05-04 04:20:14 -04:00
parent 6edf1caf6f
commit 13ca987eaf
No known key found for this signature in database
GPG key ID: 702353E0F7E48EDB

View file

@ -88,24 +88,32 @@ the library automatically picks the best size.
. .
.SH FUNCTIONAL OVERVIEW .SH FUNCTIONAL OVERVIEW
Xcursor is built in a couple of layers; at the bottom layer is code which Xcursor is built in a couple of layers; at the bottom layer is code which
can load cursor images from files. Above that is a layer which locates can load cursor images from files.
cursor files based on the library path and theme. At the top is a layer Above that is a layer which locates
cursor files based on the library path and theme.
At the top is a layer
which builds cursors either out of an image loaded from a file or one of the which builds cursors either out of an image loaded from a file or one of the
standard X cursors. When using images loaded from files, Xcursor prefers standard X cursors.
to use the Render extension CreateCursor request if supported by the X When using images loaded from files, Xcursor prefers
server. Where not supported, Xcursor maps the cursor image to a standard X to use the Render extension CreateCursor request if supported by the X server.
Where not supported, Xcursor maps the cursor image to a standard X
cursor and uses the core CreateCursor request. cursor and uses the core CreateCursor request.
. .
.SS CURSOR FILES .SS CURSOR FILES
Xcursor defines a new format for cursors on disk. Each file holds Xcursor defines a new format for cursors on disk.
one or more cursor images. Each cursor image is tagged with a nominal size Each file holds
so that the best size can be selected automatically. Multiple cursors of one or more cursor images.
Each cursor image is tagged with a nominal size
so that the best size can be selected automatically.
Multiple cursors of
the same nominal size can be loaded together; applications are expected to the same nominal size can be loaded together; applications are expected to
use them as an animated sequence. use them as an animated sequence.
.P .P
Cursor files are stored as a header containing a table of contents followed Cursor files are stored as a header containing a table of contents followed
by a sequence of chunks. The table of contents indicates the type, subtype by a sequence of chunks.
and position in the file of each chunk. The file header looks like: The table of contents indicates the type, subtype
and position in the file of each chunk.
The file header looks like:
.LP .LP
.QS .QS
\fImagic\fP\^: CARD32 "Xcur" (0x58, 0x63, 0x75, 0x72) \fImagic\fP\^: CARD32 "Xcur" (0x58, 0x63, 0x75, 0x72)
@ -135,7 +143,8 @@ additional type-specific fields:
.QE .QE
.P .P
There are currently two chunk types defined for cursor files; comments and There are currently two chunk types defined for cursor files; comments and
images. Comments look like: images.
Comments look like:
.LP .LP
.QS .QS
\fIheader\fP\^: 20 Comment headers are 20 bytes \fIheader\fP\^: 20 Comment headers are 20 bytes
@ -171,8 +180,8 @@ Images look like:
.QE .QE
. .
.SS THEMES .SS THEMES
Xcursor (mostly) follows the freedesktop.org spec for theming icons. The Xcursor (mostly) follows the freedesktop.org spec for theming icons.
default search path it uses is The default search path it uses is
.sp .sp
.RS .RS
__XCURSORPATH__ __XCURSORPATH__
@ -203,6 +212,13 @@ that as well.
Xcursor ignores other \fIkeys\fP in the \*(``index.theme\*('' file, Xcursor ignores other \fIkeys\fP in the \*(``index.theme\*('' file,
including \*(``Name\*('' (i.e., the name which a graphical including \*(``Name\*('' (i.e., the name which a graphical
application may use as the \fIpresentation name\fP). application may use as the \fIpresentation name\fP).
.PP
More than one \fItheme-name\fP may be listed on the \fBInherits=\fP line.
The freedesktop.org spec states that list items are separated by commas.
Xcursor also accepts semicolon,
but translates both to colon when searching the path.
Xcursor expects only one \fBInherits=\fP line;
the freedesktop.org spec is unclear whether multiple keys are allowed.
.RE .RE
.PP .PP
If no theme is set, or if no cursor is found for the specified theme If no theme is set, or if no cursor is found for the specified theme
@ -216,7 +232,8 @@ It always uses the first cursor file found while searching along the path.
. .
.TP .TP
.B XcursorImage .B XcursorImage
holds a single cursor image in memory. Each pixel in the cursor is a 32-bit holds a single cursor image in memory.
Each pixel in the cursor is a 32-bit
value containing ARGB with A in the high byte. value containing ARGB with A in the high byte.
.sp .sp
.QC .QC
@ -245,8 +262,9 @@ typedef struct _XcursorImages {
. .
.TP .TP
.B XcursorCursors .B XcursorCursors
Holds multiple Cursor objects. They're all freed when the XcursorCursors is Holds multiple Cursor objects.
freed. These are reference counted so that multiple XcursorAnimate They are all freed when the XcursorCursors is freed.
These are reference counted so that multiple XcursorAnimate
structures can use the same XcursorCursors. structures can use the same XcursorCursors.
.sp .sp
.QC .QC
@ -260,7 +278,8 @@ typedef struct _XcursorCursors {
. .
.TP .TP
.B XcursorAnimate .B XcursorAnimate
References a set of cursors and a sequence within that set. Multiple References a set of cursors and a sequence within that set.
Multiple
XcursorAnimate structures may reference the same XcursorCursors; each XcursorAnimate structures may reference the same XcursorCursors; each
holds a reference which is removed when the XcursorAnimate is freed. holds a reference which is removed when the XcursorAnimate is freed.
.sp .sp
@ -273,9 +292,10 @@ typedef struct _XcursorAnimate {
. .
.TP .TP
.B XcursorFile .B XcursorFile
Xcursor provides an abstract API for accessing the file data. Xcursor Xcursor provides an abstract API for accessing the file data.
provides a stdio implementation of this abstract API; applications Xcursor provides a stdio implementation of this abstract API; applications
are free to create additional implementations. These functions are free to create additional implementations.
These functions
parallel the stdio functions in return value and expected argument values; parallel the stdio functions in return value and expected argument values;
the read and write functions flip the arguments around to match the POSIX the read and write functions flip the arguments around to match the POSIX
versions. versions.
@ -301,8 +321,8 @@ XcursorImage *XcursorImageCreate (
void XcursorImageDestroy ( void XcursorImageDestroy (
XcursorImage *\fIimage\fP) XcursorImage *\fIimage\fP)
.PE .PE
Allocate and free images. On allocation, the hotspot and the pixels are Allocate and free images.
left uninitialized. On allocation, the hotspot and the pixels are left uninitialized.
The size is set to the maximum of \fIwidth\fP and \fIheight\fP. The size is set to the maximum of \fIwidth\fP and \fIheight\fP.
. .
.PS .PS
@ -312,8 +332,8 @@ XcursorImages *XcursorImagesCreate (
void XcursorImagesDestroy ( void XcursorImagesDestroy (
XcursorImages *\fIimages\fP) XcursorImages *\fIimages\fP)
.PE .PE
Allocate and free arrays to hold multiple cursor images. On allocation, Allocate and free arrays to hold multiple cursor images.
\fInimage\fP is set to zero. On allocation, \fInimage\fP is set to zero.
. .
.PS .PS
XcursorCursors *XcursorCursorsCreate ( XcursorCursors *XcursorCursorsCreate (
@ -323,8 +343,8 @@ XcursorCursors *XcursorCursorsCreate (
void XcursorCursorsDestroy ( void XcursorCursorsDestroy (
XcursorCursors *\fIcursors\fP) XcursorCursors *\fIcursors\fP)
.PE .PE
Allocate and free arrays to hold multiple cursors. On allocation, Allocate and free arrays to hold multiple cursors.
\fIncursor\fP is set to zero, \fIref\fP is set to one. On allocation, \fIncursor\fP is set to zero, \fIref\fP is set to one.
. .
. .
.SS Reading and writing images. .SS Reading and writing images.
@ -351,8 +371,8 @@ XcursorBool XcursorXcFileSave (
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.PE .PE
These read and write cursors from an XcursorFile handle. After reading, the These read and write cursors from an XcursorFile handle.
file pointer will be left at some random place in the file. After reading, the file pointer will be left at some random place in the file.
. .
.PS .PS
XcursorImage *XcursorFileLoadImage ( XcursorImage *XcursorFileLoadImage (
@ -380,8 +400,8 @@ XcursorBool XcursorFileSave (
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.PE .PE
These read and write cursors from a stdio FILE handle. Writing flushes These read and write cursors from a stdio FILE handle.
before returning so that any errors should be detected. Writing flushes before returning so that any errors should be detected.
. .
.PS .PS
XcursorImage *XcursorFilenameLoadImage ( XcursorImage *XcursorFilenameLoadImage (
@ -728,8 +748,9 @@ XcursorBool XcursorSetDefaultSize (
Display *\fIdpy\fP, Display *\fIdpy\fP,
int \fIsize\fP) int \fIsize\fP)
.PE .PE
Sets the default size for cursors on the specified display. When loading Sets the default size for cursors on the specified display.
cursors, those whose nominal size is closest to this size will be preferred. When loading cursors,
those whose nominal size is closest to this size will be preferred.
. .
.PS .PS
int XcursorGetDefaultSize ( int XcursorGetDefaultSize (
@ -869,6 +890,8 @@ XCreateFontCursor(__libmansuffix__)
.PP .PP
as well as as well as
.IP .IP
\fIIcon Theme Specification\fP
.br
https://specifications.freedesktop.org/icon-theme-spec/ https://specifications.freedesktop.org/icon-theme-spec/
. .
.SH RESTRICTIONS .SH RESTRICTIONS