fix raggedy prototypes and structure declarations using tabstops in appropriate macros

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
Thomas E. Dickey 2021-03-17 18:52:16 -04:00
parent 8560016436
commit d64dda62de
No known key found for this signature in database
GPG key ID: 702353E0F7E48EDB

View file

@ -19,18 +19,45 @@
.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE. .\" PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.de NS .de TA
.ie n .ta 0.8i 1.6i 2.4i 3.2i
.el .ta 0.5i 1.0i 1.5i 2.0i
..
.de PS
.sp .sp
.ns .ns
.TP \\$1 .TP \\$1
.na .na
.nf .nf
.ie n .ta 0.8i 3.0i
.el .ta 0.5i 2.0i
.. ..
.de NE .de PE
.br .br
.ad .ad
.fi .fi
.sp .sp
.TA
..
.de QS
.in +.2i
.nf
.na
.ie n .ta 1.0i 3.0i
.el .ta 0.6i 2.0i
..
.de QC
.QS
.ie n .ta 2.0i 3.0i
.el .ta 1.6i 2.6i
.ft CR
..
.de QE
.in -.2i
.ft
.fi
.ad
.TA
.. ..
.de bP .de bP
.ie n .IP \(bu 4 .ie n .IP \(bu 4
@ -79,62 +106,48 @@ 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. The table of contents indicates the type, subtype
and position in the file of each chunk. The file header looks like: and position in the file of each chunk. The file header looks like:
.LP .LP
.in +.2i .QS
\fImagic\fP\^: CARD32 "Xcur" (0x58, 0x63, 0x75, 0x72) \fImagic\fP\^: CARD32 "Xcur" (0x58, 0x63, 0x75, 0x72)
.br
\fIheader\fP\^: CARD32 bytes in this header \fIheader\fP\^: CARD32 bytes in this header
.br
\fIversion\fP\^: CARD32 file version number \fIversion\fP\^: CARD32 file version number
.br
\fIntoc\fP\^: CARD32 number of toc entries \fIntoc\fP\^: CARD32 number of toc entries
.br
\fItoc\fP\^: LISTofTOC table of contents \fItoc\fP\^: LISTofTOC table of contents
.in -.2i .in -.2i
.P .P
Each table of contents entry looks like: Each table of contents entry looks like:
.LP .LP
.in +.2i .QS
\fItype\fP\^: CARD32 entry type \fItype\fP\^: CARD32 entry type
.br
\fIsubtype\fP\^: CARD32 type-specific label - size for images \fIsubtype\fP\^: CARD32 type-specific label - size for images
.br
\fIposition\fP\^: CARD32 absolute byte position of table in file \fIposition\fP\^: CARD32 absolute byte position of table in file
.in -.2i .QE
.P .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
.in +.2i .QS
\fIheader\fP\^: CARD32 bytes in chunk header (including type-specific fields) \fIheader\fP\^: CARD32 bytes in chunk header (including type-specific fields)
.br
\fItype\fP\^: CARD32 must match type in TOC for this chunk \fItype\fP\^: CARD32 must match type in TOC for this chunk
.br
\fIsubtype\fP\^: CARD32 must match subtype in TOC for this chunk \fIsubtype\fP\^: CARD32 must match subtype in TOC for this chunk
.br
\fIversion\fP\^: CARD32 version number for this chunk type \fIversion\fP\^: CARD32 version number for this chunk type
.in -.2i .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
.in +.2i .QS
\fIheader\fP\^: 20 Comment headers are 20 bytes \fIheader\fP\^: 20 Comment headers are 20 bytes
.br
\fItype\fP\^: 0xfffe0001 Comment type is 0xfffe0001 \fItype\fP\^: 0xfffe0001 Comment type is 0xfffe0001
.br
\fIsubtype\fP\^: { 1 (COPYRIGHT), 2 (LICENSE), 3 (OTHER) } \fIsubtype\fP\^: { 1 (COPYRIGHT), 2 (LICENSE), 3 (OTHER) }
.br
\fIversion\fP\^: 1 \fIversion\fP\^: 1
.br
\fIlength\fP\^: CARD32 byte length of UTF-8 string \fIlength\fP\^: CARD32 byte length of UTF-8 string
.br
\fIstring\fP\^: LISTofCARD8 UTF-8 string \fIstring\fP\^: LISTofCARD8 UTF-8 string
.in -.2i .QE
.P .P
Images look like: Images look like:
.LP .LP
.in +.2i .QS
\fIheader\fP\^: 36 Image headers are 36 bytes \fIheader\fP\^: 36 Image headers are 36 bytes
.br .br
\fItype\fP\^: 0xfffd0002 Image type is 0xfffd0002 \fItype\fP\^: 0xfffd0002 Image type is 0xfffd0002
@ -154,7 +167,7 @@ Images look like:
\fIdelay\fP\^: CARD32 Delay between animation frames in milliseconds \fIdelay\fP\^: CARD32 Delay between animation frames in milliseconds
.br .br
\fIpixels\fP\^: LISTofCARD32 Packed ARGB format pixels \fIpixels\fP\^: LISTofCARD32 Packed ARGB format pixels
.in -.2i .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. The
@ -205,8 +218,7 @@ It always uses the first cursor file found while searching along the path.
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
.nf .QC
.ft CR
typedef struct _XcursorImage { typedef struct _XcursorImage {
XcursorDim size; /\(** nominal size for matching */ XcursorDim size; /\(** nominal size for matching */
XcursorDim width; /\(** actual width */ XcursorDim width; /\(** actual width */
@ -215,23 +227,20 @@ value containing ARGB with A in the high byte.
XcursorDim yhot; /\(** hot spot y (must be inside image) */ XcursorDim yhot; /\(** hot spot y (must be inside image) */
XcursorPixel *pixels; /\(** pointer to pixels */ XcursorPixel *pixels; /\(** pointer to pixels */
} XcursorImage; } XcursorImage;
.ft .QE
.fi
. .
.TP .TP
.B XcursorImages .B XcursorImages
holds multiple XcursorImage structures. holds multiple XcursorImage structures.
They are all freed when the They are all freed when the
XcursorImages is freed. XcursorImages is freed in XcursorImagesDestroy.
.sp .sp
.nf .QC
.ft CR
typedef struct _XcursorImages { typedef struct _XcursorImages {
int nimage; /\(** number of images */ int nimage; /\(** number of images */
XcursorImage **images; /\(** array of XcursorImage pointers */ XcursorImage **images; /\(** array of XcursorImage pointers */
} XcursorImages; } XcursorImages;
.ft .QE
.fi
. .
.TP .TP
.B XcursorCursors .B XcursorCursors
@ -239,16 +248,14 @@ Holds multiple Cursor objects. They're all freed when the XcursorCursors is
freed. These are reference counted so that multiple XcursorAnimate freed. These are reference counted so that multiple XcursorAnimate
structures can use the same XcursorCursors. structures can use the same XcursorCursors.
.sp .sp
.nf .QC
.ft CR
typedef struct _XcursorCursors { typedef struct _XcursorCursors {
Display *dpy; /\(** Display holding cursors */ Display *dpy; /\(** Display holding cursors */
int ref; /\(** reference count */ int ref; /\(** reference count */
int ncursor; /\(** number of cursors */ int ncursor; /\(** number of cursors */
Cursor *cursors; /\(** array of cursors */ Cursor *cursors; /\(** array of cursors */
} XcursorCursors; } XcursorCursors;
.ft .QE
.fi
. .
.TP .TP
.B XcursorAnimate .B XcursorAnimate
@ -256,14 +263,12 @@ 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
.nf .QC
.ft CR
typedef struct _XcursorAnimate { typedef struct _XcursorAnimate {
XcursorCursors *cursors; /\(** list of cursors to use */ XcursorCursors *cursors; /\(** list of cursors to use */
int sequence; /\(** which cursor is next */ int sequence; /\(** which cursor is next */
} XcursorAnimate; } XcursorAnimate;
.ft .QE
.fi
. .
.TP .TP
.B XcursorFile .B XcursorFile
@ -274,139 +279,149 @@ 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.
.sp .sp
.nf .QC
.ft CR
typedef struct _XcursorFile { typedef struct _XcursorFile {
void *closure; void *closure;
int (*read) (XcursorFile *file, unsigned char *buf, int len); int (*read) (XcursorFile *file, unsigned char *buf, int len);
int (*write) (XcursorFile *file, unsigned char *buf, int len); int (*write) (XcursorFile *file, unsigned char *buf, int len);
int (*seek) (XcursorFile *file, long offset, int whence); int (*seek) (XcursorFile *file, long offset, int whence);
}; };
.ft .QE
.fi .fi
. .
.SH FUNCTIONS .SH FUNCTIONS
. .
.SS Object Management .SS Object Management
.NS .PS
XcursorImage *XcursorImageCreate ( XcursorImage *XcursorImageCreate (
int \fIwidth\fP, int \fIwidth\fP,
int \fIheight\fP) int \fIheight\fP)
.NS .PS
void XcursorImageDestroy ( void XcursorImageDestroy (
XcursorImage *\fIimage\fP) XcursorImage *\fIimage\fP)
.NE .PE
Allocate and free images. On allocation, the hotspot and the pixels are Allocate and free images. On allocation, the hotspot and the pixels are
left uninitialized. 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.
. .
.NS .PS
XcursorImages *XcursorImagesCreate ( XcursorImages *XcursorImagesCreate (
int \fIsize\fP) int \fIsize\fP)
.NS .PS
void XcursorImagesDestroy ( void XcursorImagesDestroy (
XcursorImages *\fIimages\fP) XcursorImages *\fIimages\fP)
.NE .PE
Allocate and free arrays to hold multiple cursor images. On allocation, Allocate and free arrays to hold multiple cursor images. On allocation,
\fInimage\fP is set to zero. \fInimage\fP is set to zero.
. .
.NS .PS
XcursorCursors *XcursorCursorsCreate ( XcursorCursors *XcursorCursorsCreate (
Display *\fIdpy\fP, Display *\fIdpy\fP,
int \fIsize\fP) int \fIsize\fP)
.NS .PS
void XcursorCursorsDestroy ( void XcursorCursorsDestroy (
XcursorCursors *\fIcursors\fP) XcursorCursors *\fIcursors\fP)
.NE .PE
Allocate and free arrays to hold multiple cursors. On allocation, Allocate and free arrays to hold multiple cursors. On allocation,
\fIncursor\fP is set to zero, \fIref\fP is set to one. \fIncursor\fP is set to zero, \fIref\fP is set to one.
. .
. .
.SS Reading and writing images. .SS Reading and writing images.
. .
.NS .PS
XcursorImage *XcursorXcFileLoadImage (XcursorFile *\fIfile\fP, int \fIsize\fP) XcursorImage *XcursorXcFileLoadImage (
.NS XcursorFile *\fIfile\fP,
XcursorImages *XcursorXcFileLoadImages (XcursorFile *\fIfile\fP, int \fIsize\fP) int \fIsize\fP)
.NS .PS
XcursorImages *XcursorXcFileLoadAllImages (XcursorFile *\fIfile\fP) XcursorImages *XcursorXcFileLoadImages (
.NS XcursorFile *\fIfile\fP,
int \fIsize\fP)
.PS
XcursorImages *XcursorXcFileLoadAllImages (
XcursorFile *\fIfile\fP)
.PS
XcursorBool XcursorXcFileLoad ( XcursorBool XcursorXcFileLoad (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.NS .PS
XcursorBool XcursorXcFileSave ( XcursorBool XcursorXcFileSave (
XcursorFile *\fIfile\fP, XcursorFile *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.NE .PE
These read and write cursors from an XcursorFile handle. After reading, the These read and write cursors from an XcursorFile handle. After reading, the
file pointer will be left at some random place in the file. file pointer will be left at some random place in the file.
. .
.NS .PS
XcursorImage *XcursorFileLoadImage (FILE *\fIfile\fP, int \fIsize\fP) XcursorImage *XcursorFileLoadImage (
.NS FILE *\fIfile\fP,
XcursorImages *XcursorFileLoadImages (FILE *\fIfile\fP, int \fIsize\fP) int \fIsize\fP)
.NS .PS
XcursorImages *XcursorFileLoadAllImages (FILE *\fIfile\fP) XcursorImages *XcursorFileLoadImages (
.NS FILE *\fIfile\fP,
int \fIsize\fP)
.PS
XcursorImages *XcursorFileLoadAllImages (
FILE *\fIfile\fP)
.PS
XcursorBool XcursorFileLoad ( XcursorBool XcursorFileLoad (
FILE *\fIfile\fP, FILE *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.NS .PS
XcursorBool XcursorFileSaveImages ( XcursorBool XcursorFileSaveImages (
FILE *\fIfile\fP, FILE *\fIfile\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.NS .PS
XcursorBool XcursorFileSave ( XcursorBool XcursorFileSave (
FILE *\fIfile\fP, FILE *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.NE .PE
These read and write cursors from a stdio FILE handle. Writing flushes These read and write cursors from a stdio FILE handle. Writing flushes
before returning so that any errors should be detected. before returning so that any errors should be detected.
. .
.NS .PS
XcursorImage *XcursorFilenameLoadImage ( XcursorImage *XcursorFilenameLoadImage (
const char *\fIfilename\fP, const char *\fIfilename\fP,
int \fIsize\fP) int \fIsize\fP)
.NS .PS
XcursorImages *XcursorFilenameLoadImages ( XcursorImages *XcursorFilenameLoadImages (
const char *\fIfilename\fP, const char *\fIfilename\fP,
int \fIsize\fP) int \fIsize\fP)
.NS .PS
XcursorImages *XcursorFilenameLoadAllImages (const char *\fIfile\fP) XcursorImages *XcursorFilenameLoadAllImages (
.NS const char *\fIfile\fP)
.PS
XcursorBool XcursorFilenameLoad ( XcursorBool XcursorFilenameLoad (
const char *\fIfile\fP, const char *\fIfile\fP,
XcursorComments **\fIcommentsp\fP, XcursorComments **\fIcommentsp\fP,
XcursorImages **\fIimagesp\fP) XcursorImages **\fIimagesp\fP)
.NS .PS
XcursorBool XcursorFilenameSaveImages ( XcursorBool XcursorFilenameSaveImages (
const char *\fIfilename\fP, const char *\fIfilename\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.NS .PS
XcursorBool XcursorFilenameSave ( XcursorBool XcursorFilenameSave (
const char *\fIfile\fP, const char *\fIfile\fP,
const XcursorComments *\fIcomments\fP, const XcursorComments *\fIcomments\fP,
const XcursorImages *\fIimages\fP) const XcursorImages *\fIimages\fP)
.NE .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
.NS .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)
.NS .PS
XcursorImages *XcursorLibraryLoadImages ( XcursorImages *XcursorLibraryLoadImages (
const char *\fIname\fP, const char *\fIname\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
int \fIsize\fP) int \fIsize\fP)
.NE .PE
These search the library path, loading the first file found These search the library path, loading the first file found
of the desired \fIsize\fP, of the desired \fIsize\fP,
using a private function (XcursorScanTheme) to find the appropriate theme: using a private function (XcursorScanTheme) to find the appropriate theme:
@ -432,9 +447,9 @@ it calls XcursorImagesSetName to associate \fIname\fP with the result.
.RE .RE
. .
.SS Library attributes .SS Library attributes
.NS .PS
const char * XcursorLibraryPath (void) const char * XcursorLibraryPath (void)
.NE .PE
Returns the library search path: Returns the library search path:
.RS .RS
.bP .bP
@ -444,9 +459,10 @@ return that value.
Otherwise, return the compiled-in search path. Otherwise, return the compiled-in search path.
.RE .RE
. .
.NS .PS
int XcursorLibraryShape (const char *\fIlibrary\fP) int XcursorLibraryShape (
.NE const char *\fIlibrary\fP)
.PE
Search Xcursor's table of cursor font names for the given Search Xcursor's table of cursor font names for the given
\*(``shape name\*('' (\fIlibrary\fP): \*(``shape name\*('' (\fIlibrary\fP):
.RS .RS
@ -460,34 +476,34 @@ If not found, return -1.
. .
.SS Cursor APIs .SS Cursor APIs
. .
.NS .PS
Cursor XcursorFilenameLoadCursor ( Cursor XcursorFilenameLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIfile\fP) const char *\fIfile\fP)
.NS .PS
XcursorCursors *XcursorFilenameLoadCursors ( XcursorCursors *XcursorFilenameLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIfile\fP) const char *\fIfile\fP)
.NE .PE
These load cursors from the specified file. These load cursors from the specified file.
. .
.NS .PS
Cursor XcursorLibraryLoadCursor ( Cursor XcursorLibraryLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIname\fP) const char *\fIname\fP)
.NS .PS
XcursorCursors *XcursorLibraryLoadCursors ( XcursorCursors *XcursorLibraryLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
const char *\fIname\fP) const char *\fIname\fP)
.NE .PE
These load cursors using the specified library \fIname\fP. The theme These load cursors using the specified library \fIname\fP. The theme
comes from the display. comes from the display.
. .
.NS .PS
Cursor XcursorImageLoadCursor( Cursor XcursorImageLoadCursor(
Display *dpy, Display *\fIdpy\fP,
const XcursorImage *image) const XcursorImage *\fIimage\fP)
.NE .PE
This creates a cursor, given the image to display. This creates a cursor, given the image to display.
It calls XcursorSupportsARGB to decide what type of cursor to create: It calls XcursorSupportsARGB to decide what type of cursor to create:
.RS .RS
@ -497,21 +513,21 @@ XRenderCreateCursor is used if ARGB is supported on the display, and
XCreatePixmapCursor is used otherwise. XCreatePixmapCursor is used otherwise.
.RE .RE
. .
.NS .PS
Cursor XcursorImagesLoadCursor( Cursor XcursorImagesLoadCursor(
Display *dpy, Display *\fIdpy\fP,
const XcursorImages *images) const XcursorImages *\fIimages\fP)
.NE .PE
This provides an interface for creating animated cursors, This provides an interface for creating animated cursors,
if the \fIimages\fP array contains multiple images, and if the \fIimages\fP array contains multiple images, and
if XcursorSupportsAnim returns true. if XcursorSupportsAnim returns true.
Otherwise, it calls XcursorImageLoadCursor. Otherwise, it calls XcursorImageLoadCursor.
. .
.NS .PS
XcursorCursors *XcursorImagesLoadCursors( XcursorCursors *XcursorImagesLoadCursors(
Display *dpy, Display *\fIdpy\fP,
const XcursorImages *images) const XcursorImages *\fIimages\fP)
.NE .PE
This calls XcursorCursorsCreate to create an array of XcursorCursors, This calls XcursorCursorsCreate to create an array of XcursorCursors,
to correspond to the XcursorImages \fIimages\fP array, to correspond to the XcursorImages \fIimages\fP array,
and uses XcursorImageLoadCursor to load the corresponding cursor data. and uses XcursorImageLoadCursor to load the corresponding cursor data.
@ -522,84 +538,84 @@ and returns NULL.
. .
.SS X Cursor Name APIs .SS X Cursor Name APIs
. .
.NS .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)
.NS .PS
XcursorImages *XcursorShapeLoadImages ( XcursorImages *XcursorShapeLoadImages (
unsigned int \fIshape\fP, unsigned int \fIshape\fP,
const char *\fItheme\fP, const char *\fItheme\fP,
int \fIsize\fP) int \fIsize\fP)
.NE .PE
These map \fIshape\fP to a library name using the standard X cursor names and These map \fIshape\fP to a library name using the standard X cursor names and
then load the images. then load the images.
. .
.NS .PS
Cursor XcursorShapeLoadCursor ( Cursor XcursorShapeLoadCursor (
Display *\fIdpy\fP, Display *\fIdpy\fP,
unsigned int \fIshape\fP) unsigned int \fIshape\fP)
.NS .PS
XcursorCursors *XcursorShapeLoadCursors ( XcursorCursors *XcursorShapeLoadCursors (
Display *\fIdpy\fP, Display *\fIdpy\fP,
unsigned int \fIshape\fP) unsigned int \fIshape\fP)
.NE .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
.NS .PS
XcursorComment *XcursorCommentCreate ( XcursorComment *XcursorCommentCreate (
XcursorUInt comment_type, XcursorUInt \fIcomment_type\fP,
int length) int \fIlength\fP)
.NE .PE
XcursorXcFileLoad uses this function to allocate an XcursorComment XcursorXcFileLoad uses this function to allocate an XcursorComment
structure for a single cursor. structure for a single cursor.
The \fIcomment_type\fP parameter is used as the \fIsubtype\fP field, The \fIcomment_type\fP parameter is used as the \fIsubtype\fP field,
e.g., COPYRIGHT. e.g., COPYRIGHT.
The \fIlength\fP is the number of bytes to allocate for the comment text. The \fIlength\fP is the number of bytes to allocate for the comment text.
. .
.NS .PS
void XcursorCommentDestroy( void XcursorCommentDestroy(
XcursorComment *comment) XcursorComment *\fIcomment\fP)
.NE .PE
Deallocates the given XcursorComment structure. Deallocates the given XcursorComment structure.
. .
.NS .PS
XcursorComments * XcursorCommentsCreate ( XcursorComments * XcursorCommentsCreate (
int size) int \fIsize\fP)
.NE .PE
XcursorXcFileLoad uses this function to allocate an index of XcursorXcFileLoad uses this function to allocate an index of
XcursorComment structure pointers. XcursorComment structure pointers.
The \fIsize\fP parameter tells it how many pointers will be in the index. The \fIsize\fP parameter tells it how many pointers will be in the index.
. .
.NS .PS
void XcursorCommentsDestroy ( void XcursorCommentsDestroy (
XcursorComments *comments) XcursorComments *\fIcomments\fP)
.NE .PE
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
.NS .PS
XcursorAnimate * XcursorAnimateCreate ( XcursorAnimate * XcursorAnimateCreate (
XcursorCursors *cursors) XcursorCursors *\fIcursors\fP)
.NE .PE
Wrap the given array of cursors in a newly allocated XcursorAnimate structure, Wrap the given array of cursors in a newly allocated XcursorAnimate structure,
which adds a sequence number used in XcursorAnimateNext. which adds a sequence number used in XcursorAnimateNext.
. .
.NS .PS
void XcursorAnimateDestroy ( void XcursorAnimateDestroy (
XcursorAnimate *animate) XcursorAnimate *\fIanimate\fP)
.NE .PE
Discards the given \fIanimate\fP data, Discards the given \fIanimate\fP data,
freeing both the XcursorCursors array of cursors freeing both the XcursorCursors array of cursors
as well as the XcursorAnimate structure. as well as the XcursorAnimate structure.
. .
.NS .PS
Cursor XcursorAnimateNext ( Cursor XcursorAnimateNext (
XcursorAnimate *animate) XcursorAnimate *\fIanimate\fP)
.NE .PE
Cyclically returns the next Cursor in the array, Cyclically returns the next Cursor in the array,
incrementing the sequence number to prepare for the next call. incrementing the sequence number to prepare for the next call.
.IP .IP
@ -609,73 +625,73 @@ 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.
.NS .PS
void XcursorImageHash ( void XcursorImageHash (
XImage *image, XImage *\fIimage\fP,
unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]) unsigned char \fIhash\fP[XCURSOR_BITMAP_HASH_SIZE])
.NE .PE
Compute a hash of the image, Compute a hash of the image,
to display when the environment variable XCURSOR_DISCOVER is set. to display when the environment variable XCURSOR_DISCOVER is set.
. .
.NS .PS
void XcursorImagesSetName ( void XcursorImagesSetName (
XcursorImages *images, XcursorImages *\fIimages\fP,
const char *name) const char *\fIname\fP)
.NE .PE
Associates the given name with the images. Associates the given name with the images.
. .
.NS .PS
void XcursorNoticeCreateBitmap ( void XcursorNoticeCreateBitmap (
Display *dpy, Display *\fIdpy\fP,
Pixmap pid, Pixmap \fIpid\fP,
unsigned int width, unsigned int \fIwidth\fP,
unsigned int height) unsigned int \fIheight\fP)
.NE .PE
Check if the display supports either ARGB or themes, Check if the display supports either ARGB or themes,
and also if the image size fits within the maximum cursor size (64 pixels). and also if the image size fits within the maximum cursor size (64 pixels).
If so, create a bitmap of the specified size, If so, create a bitmap of the specified size,
and cache the result in Xcursor, and cache the result in Xcursor,
identifying it with the Pixmap-id (pid) value. identifying it with the Pixmap-id (pid) value.
. .
.NS .PS
void XcursorNoticePutBitmap ( void XcursorNoticePutBitmap (
Display *dpy, Display *\fIdpy\fP,
Drawable draw, Drawable \fIdraw\fP,
XImage *image) XImage *\fIimage\fP)
.NE .PE
Update the image contents in the bitmap specified by the draw value Update the image contents in the bitmap specified by the draw value
(a Pixmap-id). (a Pixmap-id).
The bitmap must have been created by XcursorNoticeCreateBitmap. The bitmap must have been created by XcursorNoticeCreateBitmap.
. .
.NS .PS
Cursor XcursorTryShapeBitmapCursor ( Cursor XcursorTryShapeBitmapCursor (
Display *dpy, Display *\fIdpy\fP,
Pixmap source, Pixmap \fIsource\fP,
Pixmap mask, Pixmap \fImask\fP,
XColor *foreground, XColor *\fIforeground\fP,
XColor *background, XColor *\fIbackground\fP,
unsigned int x, unsigned int \fIx\fP,
unsigned int y) unsigned int \fIy\fP)
.NE .PE
If the display supports either ARGB or themes, If the display supports either ARGB or themes,
try to load a cursor into Xcursor's cache try to load a cursor into Xcursor's cache
using the source parameter as a Pixmap-id. using the \fIsource\fP parameter as a Pixmap-id.
The source may no longer be in the cache. The source may no longer be in the cache.
Xcursor uses the hash value to identify the desired image. Xcursor uses the hash value to identify the desired image.
. .
.NS .PS
Cursor XcursorTryShapeCursor ( Cursor XcursorTryShapeCursor (
Display *dpy, Display *\fIdpy\fP,
Font source_font, Font \fIsource_font\fP,
Font mask_font, Font \fImask_font\fP,
unsigned int source_char, unsigned int \fIsource_char\fP,
unsigned int mask_char, unsigned int \fImask_char\fP,
XColor _Xconst *foreground, XColor _Xconst *\fIforeground\fP,
XColor _Xconst *background) XColor _Xconst *\fIbackground\fP)
.NE .PE
If the display supports either ARGB or themes, If the display supports either ARGB or themes,
try to load a cursor into Xcursor's cache try to load a cursor into Xcursor's cache
using the source_char parameter as a shape. using the \fIsource_char\fP parameter as a shape.
Using Using
.RS .RS
.bP .bP
@ -683,7 +699,7 @@ the default size from XcursorGetDefaultSize,
.bP .bP
the default theme from XcursorGetTheme, and the default theme from XcursorGetTheme, and
.bP .bP
the source_char parameter as a shape, the \fIsource_char\fP parameter as a shape,
.RE .RE
.IP .IP
Xcursor calls XcursorShapeLoadImages to load the cursor images. Xcursor calls XcursorShapeLoadImages to load the cursor images.
@ -692,48 +708,56 @@ to load the cursor information.
. .
.SS Display Information APIs .SS Display Information APIs
. .
.NS .PS
XcursorBool XcursorSupportsARGB (Display *\fIdpy\fP) XcursorBool XcursorSupportsARGB (
.NE Display *\fIdpy\fP)
.PE
Returns true if the display supports ARGB cursors. Returns true if the display supports ARGB cursors.
Otherwise, cursors will be mapped to a core X cursor. Otherwise, cursors will be mapped to a core X cursor.
. .
.NS .PS
XcursorBool XcursorSupportsAnim (Display *\fIdpy\fP) XcursorBool XcursorSupportsAnim (
.NE Display *\fIdpy\fP)
.PE
Returns true if the display supports animated cursors. Returns true if the display supports animated cursors.
Otherwise, cursors will be mapped to a core X cursor. Otherwise, cursors will be mapped to a core X cursor.
. .
.NS .PS
XcursorBool XcursorSetDefaultSize (Display *\fIdpy\fP, int \fIsize\fP) XcursorBool XcursorSetDefaultSize (
.NE Display *\fIdpy\fP,
int \fIsize\fP)
.PE
Sets the default size for cursors on the specified display. When loading Sets the default size for cursors on the specified display. When loading
cursors, those whose nominal size is closest to this size will be preferred. cursors, those whose nominal size is closest to this size will be preferred.
. .
.NS .PS
int XcursorGetDefaultSize (Display *\fIdpy\fP) int XcursorGetDefaultSize (
.NE Display *\fIdpy\fP)
.PE
Gets the default cursor size. Gets the default cursor size.
. .
.NS .PS
XcursorBool XcursorSetTheme (Display *\fIdpy\fP, const char *\fItheme\fP) XcursorBool XcursorSetTheme (
.NE Display *\fIdpy\fP,
const char *\fItheme\fP)
.PE
Sets the current theme name. Sets the current theme name.
. .
.NS .PS
char *XcursorGetTheme (Display *\fIdpy\fP) char *XcursorGetTheme (
.NE Display *\fIdpy\fP)
.PE
Gets the current theme name. Gets the current theme name.
. .
.NS .PS
XcursorBool XcursorGetThemeCore ( XcursorBool XcursorGetThemeCore (
Display *\fIdpy\fP) Display *\fIdpy\fP)
.NS .PS
XcursorBool XcursorSetThemeCore ( XcursorBool XcursorSetThemeCore (
Display *\fIdpy\fP, Display *\fIdpy\fP,
XcursorBool \fItheme_core\fP) XcursorBool \fItheme_core\fP)
.NE .PE
Get or set property which tells Xcurses 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 VARIABLES"