improve manpage formatting

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
Thomas E. Dickey 2024-10-27 12:49:16 -04:00
parent 7e03738efd
commit e1b6d3abb4
No known key found for this signature in database
GPG key ID: CC2AF4472167BE03

View file

@ -25,14 +25,17 @@
.el .ta 0.5i 1.0i 1.5i 2.0i .el .ta 0.5i 1.0i 1.5i 2.0i
.. ..
.de PS .de PS
.sp
.ns .ns
.TP \\$1 .TP
.na .na
.nf .nf
.ie n .ta 0.8i 3.0i .ie n .ta 0.8i 3.0i
.el .ta 0.5i 2.0i .el .ta 0.5i 2.0i
.. ..
.de PC
.sp
.PS
..
.de PE .de PE
.br .br
.ad .ad
@ -71,8 +74,8 @@
.TH XCURSOR __libmansuffix__ __xorgversion__ "X Version 11" .TH XCURSOR __libmansuffix__ __xorgversion__ "X Version 11"
.hy 0 .hy 0
.SH NAME .SH NAME
Xcursor \- Cursor management library Xcursor \-
. Cursor management library
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B #include <X11/Xcursor/Xcursor.h> .B #include <X11/Xcursor/Xcursor.h>
@ -99,7 +102,7 @@ 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 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. Xcursor defines a new format for cursors on disk.
Each file holds Each file holds
one or more cursor images. one or more cursor images.
@ -121,7 +124,7 @@ The file header looks like:
\fIversion\fP\^: CARD32 file version number \fIversion\fP\^: CARD32 file version number
\fIntoc\fP\^: CARD32 number of toc entries \fIntoc\fP\^: CARD32 number of toc entries
\fItoc\fP\^: LISTofTOC table of contents \fItoc\fP\^: LISTofTOC table of contents
.in -.2i .QE
.P .P
Each table of contents entry looks like: Each table of contents entry looks like:
.LP .LP
@ -131,7 +134,6 @@ Each table of contents entry looks like:
\fIposition\fP\^: CARD32 absolute byte position of table in file \fIposition\fP\^: CARD32 absolute byte position of table in file
.QE .QE
.P .P
.P
Each chunk in the file has set of common header fields followed by Each chunk in the file has set of common header fields followed by
additional type-specific fields: additional type-specific fields:
.LP .LP
@ -194,7 +196,7 @@ Within the theme directory,
it looks for cursor files in the \*(``cursors\*('' subdirectory. it looks for cursor files in the \*(``cursors\*('' subdirectory.
.IP .IP
Xcursor looks for a specific file, Xcursor looks for a specific file,
which must be one of the cursor \fIshape\fP names, which must be one of the cursor \fIshape\fP names,
e.g., as used in XcursorLibraryLoadImage or XcursorLibraryShape. e.g., as used in XcursorLibraryLoadImage or XcursorLibraryShape.
.bP .bP
If it finds no matching cursor file in the \*(``cursors\*('' subdirectory, If it finds no matching cursor file in the \*(``cursors\*('' subdirectory,
@ -308,16 +310,15 @@ typedef struct _XcursorFile {
int (*seek) (XcursorFile *file, long offset, int whence); int (*seek) (XcursorFile *file, long offset, int whence);
}; };
.QE .QE
.fi
. .
.SH FUNCTIONS .SH FUNCTIONS
. .
.SS Object Management .SS "Object Management"
.PS .PS
XcursorImage *XcursorImageCreate ( XcursorImage *XcursorImageCreate (
int \fIwidth\fP, int \fIwidth\fP,
int \fIheight\fP) int \fIheight\fP)
.PS .PC
void XcursorImageDestroy ( void XcursorImageDestroy (
XcursorImage *\fIimage\fP) XcursorImage *\fIimage\fP)
.PE .PE
@ -328,7 +329,7 @@ The size is set to the maximum of \fIwidth\fP and \fIheight\fP.
.PS .PS
XcursorImages *XcursorImagesCreate ( XcursorImages *XcursorImagesCreate (
int \fIsize\fP) int \fIsize\fP)
.PS .PC
void XcursorImagesDestroy ( void XcursorImagesDestroy (
XcursorImages *\fIimages\fP) XcursorImages *\fIimages\fP)
.PE .PE
@ -339,7 +340,7 @@ On allocation, \fInimage\fP is set to zero.
XcursorCursors *XcursorCursorsCreate ( XcursorCursors *XcursorCursorsCreate (
Display *\fIdpy\fP, Display *\fIdpy\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
void XcursorCursorsDestroy ( void XcursorCursorsDestroy (
XcursorCursors *\fIcursors\fP) XcursorCursors *\fIcursors\fP)
.PE .PE
@ -347,25 +348,25 @@ Allocate and free arrays to hold multiple cursors.
On allocation, \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"
. .
.PS .PS
XcursorImage *XcursorXcFileLoadImage ( XcursorImage *XcursorXcFileLoadImage (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorXcFileLoadImages ( XcursorImages *XcursorXcFileLoadImages (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorXcFileLoadAllImages ( XcursorImages *XcursorXcFileLoadAllImages (
XcursorFile *\fIfile\fP) XcursorFile *\fIfile\fP)
.PS .PC
XcursorBool XcursorXcFileLoad ( XcursorBool XcursorXcFileLoad (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.PS .PC
XcursorBool XcursorXcFileSave ( XcursorBool XcursorXcFileSave (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
@ -378,23 +379,23 @@ After reading, the file pointer will be left at some random place in the file.
XcursorImage *XcursorFileLoadImage ( XcursorImage *XcursorFileLoadImage (
FILE *\fIfile\fP, FILE *\fIfile\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorFileLoadImages ( XcursorImages *XcursorFileLoadImages (
FILE *\fIfile\fP, FILE *\fIfile\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorFileLoadAllImages ( XcursorImages *XcursorFileLoadAllImages (
FILE *\fIfile\fP) FILE *\fIfile\fP)
.PS .PC
XcursorBool XcursorFileLoad ( XcursorBool XcursorFileLoad (
FILE *\fIfile\fP, FILE *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.PS .PC
XcursorBool XcursorFileSaveImages ( XcursorBool XcursorFileSaveImages (
FILE *\fIfile\fP, FILE *\fIfile\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.PS .PC
XcursorBool XcursorFileSave ( XcursorBool XcursorFileSave (
FILE *\fIfile\fP, FILE *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
@ -407,23 +408,23 @@ Writing flushes before returning so that any errors should be detected.
XcursorImage *XcursorFilenameLoadImage ( XcursorImage *XcursorFilenameLoadImage (
const char *\fIfilename\fP, const char *\fIfilename\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorFilenameLoadImages ( XcursorImages *XcursorFilenameLoadImages (
const char *\fIfilename\fP, const char *\fIfilename\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorFilenameLoadAllImages ( XcursorImages *XcursorFilenameLoadAllImages (
const char *\fIfile\fP) const char *\fIfile\fP)
.PS .PC
XcursorBool XcursorFilenameLoad ( XcursorBool XcursorFilenameLoad (
const char *\fIfile\fP, const char *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.PS .PC
XcursorBool XcursorFilenameSaveImages ( XcursorBool XcursorFilenameSaveImages (
const char *\fIfilename\fP, const char *\fIfilename\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.PS .PC
XcursorBool XcursorFilenameSave ( XcursorBool XcursorFilenameSave (
const char *\fIfile\fP, const char *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
@ -431,13 +432,13 @@ XcursorBool XcursorFilenameSave (
.PE .PE
These parallel the stdio FILE interfaces above, but take filenames. These parallel the stdio FILE interfaces above, but take filenames.
. .
.SS Reading library images .SS "Reading library images"
.PS .PS
XcursorImage *XcursorLibraryLoadImage ( XcursorImage *XcursorLibraryLoadImage (
const char *\fIname\fP, const char *\fIname\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorLibraryLoadImages ( XcursorImages *XcursorLibraryLoadImages (
const char *\fIname\fP, const char *\fIname\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
@ -467,7 +468,7 @@ and (on success)
it calls XcursorImagesSetName to associate \fIname\fP with the result. it calls XcursorImagesSetName to associate \fIname\fP with the result.
.RE .RE
. .
.SS Library attributes .SS "Library attributes"
.PS .PS
const char * XcursorLibraryPath (void) const char * XcursorLibraryPath (void)
.PE .PE
@ -480,7 +481,7 @@ return that value.
Otherwise, return the compiled-in search path. Otherwise, return the compiled-in search path.
.RE .RE
. .
.PS .PC
int XcursorLibraryShape ( int XcursorLibraryShape (
const char *\fIlibrary\fP) const char *\fIlibrary\fP)
.PE .PE
@ -495,13 +496,13 @@ used in an X cursor font).
If not found, return -1. If not found, return -1.
.RE .RE
. .
.SS Cursor APIs .SS "Cursor APIs"
. .
.PS .PS
Cursor XcursorFilenameLoadCursor ( Cursor XcursorFilenameLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIfile\fP) const char *\fIfile\fP)
.PS .PC
XcursorCursors *XcursorFilenameLoadCursors ( XcursorCursors *XcursorFilenameLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIfile\fP) const char *\fIfile\fP)
@ -512,7 +513,7 @@ These load cursors from the specified file.
Cursor XcursorLibraryLoadCursor ( Cursor XcursorLibraryLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIname\fP) const char *\fIname\fP)
.PS .PC
XcursorCursors *XcursorLibraryLoadCursors ( XcursorCursors *XcursorLibraryLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIname\fP) const char *\fIname\fP)
@ -534,7 +535,7 @@ XRenderCreateCursor is used if ARGB is supported on the display, and
XCreatePixmapCursor is used otherwise. XCreatePixmapCursor is used otherwise.
.RE .RE
. .
.PS .PC
Cursor XcursorImagesLoadCursor( Cursor XcursorImagesLoadCursor(
Display *\fIdpy\fP, Display *\fIdpy\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
@ -557,14 +558,14 @@ Normally it returns the resulting array pointer.
On any failure, it discards the result XcursorCursorsDestroy, On any failure, it discards the result XcursorCursorsDestroy,
and returns NULL. and returns NULL.
. .
.SS X Cursor Name APIs .SS "X Cursor Name APIs"
. .
.PS .PS
XcursorImage *XcursorShapeLoadImage ( XcursorImage *XcursorShapeLoadImage (
unsigned int \fIshape\fP, unsigned int \fIshape\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
int \fIsize\fP) int \fIsize\fP)
.PS .PC
XcursorImages *XcursorShapeLoadImages ( XcursorImages *XcursorShapeLoadImages (
unsigned int \fIshape\fP, unsigned int \fIshape\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
@ -577,14 +578,14 @@ then load the images.
Cursor XcursorShapeLoadCursor ( Cursor XcursorShapeLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
unsigned int \fIshape\fP) unsigned int \fIshape\fP)
.PS .PC
XcursorCursors *XcursorShapeLoadCursors ( XcursorCursors *XcursorShapeLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
unsigned int \fIshape\fP) unsigned int \fIshape\fP)
.PE .PE
These map \fIshape\fP to a library name and then load the cursors. These map \fIshape\fP to a library name and then load the cursors.
. .
.SS X Cursor Comment APIs .SS "X Cursor Comment APIs"
.PS .PS
XcursorComment *XcursorCommentCreate ( XcursorComment *XcursorCommentCreate (
XcursorUInt \fIcomment_type\fP, XcursorUInt \fIcomment_type\fP,
@ -617,7 +618,7 @@ void XcursorCommentsDestroy (
Deallocates the given XcursorComments structure Deallocates the given XcursorComments structure
as well as the XcursorComment structures which it points to. as well as the XcursorComment structures which it points to.
. .
.SS Animated Cursors .SS "Animated Cursors"
.PS .PS
XcursorAnimate * XcursorAnimateCreate ( XcursorAnimate * XcursorAnimateCreate (
XcursorCursors *\fIcursors\fP) XcursorCursors *\fIcursors\fP)
@ -643,7 +644,7 @@ incrementing the sequence number to prepare for the next call.
The caller is responsible for displaying the series of Cursor images. The caller is responsible for displaying the series of Cursor images.
Xcursor does not do that. Xcursor does not do that.
. .
.SS Glyph Cursor APIs .SS "Glyph Cursor APIs"
The X11 XCreateFontCursor and XCreateGlyphCursor functions use The X11 XCreateFontCursor and XCreateGlyphCursor functions use
this part of the API to extend the X core cursors feature to use themes. this part of the API to extend the X core cursors feature to use themes.
.PS .PS
@ -727,7 +728,7 @@ Xcursor calls XcursorShapeLoadImages to load the cursor images.
If successful, Xcursor uses XcursorImagesLoadCursor If successful, Xcursor uses XcursorImagesLoadCursor
to load the cursor information. to load the cursor information.
. .
.SS Display Information APIs .SS "Display Information APIs"
. .
.PS .PS
XcursorBool XcursorSupportsARGB ( XcursorBool XcursorSupportsARGB (
@ -771,18 +772,18 @@ char *XcursorGetTheme (
.PE .PE
Gets the current theme name. Gets the current theme name.
. .
.PS .PC
XcursorBool XcursorGetThemeCore ( XcursorBool XcursorGetThemeCore (
Display *\fIdpy\fP) Display *\fIdpy\fP)
.PS .PC
XcursorBool XcursorSetThemeCore ( XcursorBool XcursorSetThemeCore (
Display *\fIdpy\fP, Display *\fIdpy\fP,
XcursorBool \fItheme_core\fP) XcursorBool \fItheme_core\fP)
.PE .PE
Get or set property which tells Xcursor whether to Get or set property which tells Xcursor whether to
enable themes for core cursors. enable themes for core cursors.
. .
.SH "ENVIRONMENT VARIABLES" .SH ENVIRONMENT
Environment variables can be used to override resource settings, Environment variables can be used to override resource settings,
which in turn override compiled-in default values. which in turn override compiled-in default values.
.PP .PP
@ -881,6 +882,14 @@ Xcursor tries the \fBXcursor.theme_core\fP resource.
.IP .IP
An application can enable or disable themes using XcursorSetThemeCore. An application can enable or disable themes using XcursorSetThemeCore.
. .
.SH CAVEATS
.B Xcursor
will probably change radically in the future; weak attempts will be made to
retain some level of source-file compatibility.
.
.SH AUTHORS
Keith Packard
.
.SH SEE ALSO .SH SEE ALSO
.na .na
XCreateRenderCursor(__libmansuffix__), XCreateRenderCursor(__libmansuffix__),
@ -893,11 +902,3 @@ as well as
\fIIcon Theme Specification\fP \fIIcon Theme Specification\fP
.br .br
https://specifications.freedesktop.org/icon-theme-spec/ https://specifications.freedesktop.org/icon-theme-spec/
.
.SH RESTRICTIONS
.B Xcursor
will probably change radically in the future; weak attempts will be made to
retain some level of source-file compatibility.
.
.SH AUTHOR
Keith Packard