diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-25 17:02:54 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-25 17:02:54 +0000 |
commit | f5f6cabf0983a22f8bb256d604ffc21c1a6cf8ca (patch) | |
tree | 4ee1fb346ef12f424b40b9c2669b60ed1b01ddb7 /lib/libXcursor/man | |
parent | a789231d9f4882130ff12ea5b5702c08f911ed4d (diff) |
import from X.Org 7.2RC1
Diffstat (limited to 'lib/libXcursor/man')
-rw-r--r-- | lib/libXcursor/man/Makefile.am | 18 | ||||
-rw-r--r-- | lib/libXcursor/man/Makefile.in | 382 | ||||
-rw-r--r-- | lib/libXcursor/man/Xcursor.man | 381 |
3 files changed, 781 insertions, 0 deletions
diff --git a/lib/libXcursor/man/Makefile.am b/lib/libXcursor/man/Makefile.am new file mode 100644 index 000000000..725a67686 --- /dev/null +++ b/lib/libXcursor/man/Makefile.am @@ -0,0 +1,18 @@ +libmandir = $(LIB_MAN_DIR) + +libman_PRE = Xcursor.man +libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) + +all-local: $(libman_DATA) + +EXTRA_DIST = $(libman_PRE) +CLEANFILES = $(libman_DATA) + +SUFFIXES = .$(LIB_MAN_SUFFIX) .man + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + +.man.$(LIB_MAN_SUFFIX): + -rm -f $@ + sed 's/__xorgversion__/"$(XORGRELSTRING)"/; s/__LIB_MAN_SUFFIX__/$(LIB_MAN_SUFFIX)/; s%__prefix__%$(prefix)%g; s%__ICONDIR__%$(ICONDIR)%g' < $< > $@ diff --git a/lib/libXcursor/man/Makefile.in b/lib/libXcursor/man/Makefile.in new file mode 100644 index 000000000..262cf95cf --- /dev/null +++ b/lib/libXcursor/man/Makefile.in @@ -0,0 +1,382 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libmandir)" +libmanDATA_INSTALL = $(INSTALL_DATA) +DATA = $(libman_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +ICONDIR = @ICONDIR@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINT = @LINT@ +LINT_FALSE = @LINT_FALSE@ +LINT_FLAGS = @LINT_FLAGS@ +LINT_TRUE = @LINT_TRUE@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XCURSORPATH = @XCURSORPATH@ +XCURSOR_CFLAGS = @XCURSOR_CFLAGS@ +XCURSOR_LIBS = @XCURSOR_LIBS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +libmandir = $(LIB_MAN_DIR) +libman_PRE = Xcursor.man +libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) +EXTRA_DIST = $(libman_PRE) +CLEANFILES = $(libman_DATA) +SUFFIXES = .$(LIB_MAN_SUFFIX) .man + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .$(LIB_MAN_SUFFIX) .man +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu man/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-libmanDATA: $(libman_DATA) + @$(NORMAL_INSTALL) + test -z "$(libmandir)" || $(mkdir_p) "$(DESTDIR)$(libmandir)" + @list='$(libman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(libmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libmandir)/$$f'"; \ + $(libmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libmandir)/$$f"; \ + done + +uninstall-libmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(libman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(libmandir)/$$f'"; \ + rm -f "$(DESTDIR)$(libmandir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(libmandir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-libmanDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-libmanDATA + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-libmanDATA install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-libmanDATA + + +all-local: $(libman_DATA) + +.man.$(LIB_MAN_SUFFIX): + -rm -f $@ + sed 's/__xorgversion__/"$(XORGRELSTRING)"/; s/__LIB_MAN_SUFFIX__/$(LIB_MAN_SUFFIX)/; s%__prefix__%$(prefix)%g; s%__ICONDIR__%$(ICONDIR)%g' < $< > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/libXcursor/man/Xcursor.man b/lib/libXcursor/man/Xcursor.man new file mode 100644 index 000000000..cab5bee7b --- /dev/null +++ b/lib/libXcursor/man/Xcursor.man @@ -0,0 +1,381 @@ +.\" +.\" $Id: Xcursor.man,v 1.1 2006/11/25 17:00:29 matthieu Exp $ +.\" +.\" Copyright © 2002 Keith Packard +.\" +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation, and that the name of Keith Packard not be used in +.\" advertising or publicity pertaining to distribution of the software without +.\" specific, written prior permission. Keith Packard makes no +.\" representations about the suitability of this software for any purpose. It +.\" is provided "as is" without express or implied warranty. +.\" +.\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +.\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +.\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +.\" DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +.\" PERFORMANCE OF THIS SOFTWARE. +.\" +.de TQ +.br +.ns +.TP \\$1 +.. +.TH XCURSOR __LIB_MAN_SUFFIX__ __xorgversion__ "Keith Packard" + +.SH NAME +XCURSOR \- Cursor management library + +.SH SYNOPSIS +.nf +.B #include <X11/Xcursor/Xcursor.h> +.fi +.SH DESCRIPTION +.B Xcursor +is a simple library designed to help locate and load cursors. Cursors can +be loaded from files or memory. A library of common cursors exists which +map to the standard X cursor names. Cursors can exist in several sizes and +the library automatically picks the best size. + +.SH FUNCTIONAL OVERVIEW +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 +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 +standard X cursors. When using images loaded from files, Xcursor prefers +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. + +.SS CURSOR FILES +Xcursor defines a new format for cursors on disk. Each file holds +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 +use them as an animated sequence. +.P +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 +and position in the file of each chunk. The file header looks like: +.LP +.in +.2i +\fImagic\fP\^: CARD32 'Xcur' (0x58, 0x63, 0x75, 0x72) +.br +\fIheader\fP\^: CARD32 bytes in this header +.br +\fIversion\fP\^: CARD32 file version number +.br +\fIntoc\fP\^: CARD32 number of toc entries +.br +\fItoc\fP\^: LISTofTOC table of contents +.in -.2i +.P +Each table of contents entry looks like: +.LP +.in +.2i +\fItype\fP\^: CARD32 entry type +.br +\fIsubtype\fP\^: CARD32 type-specific label - size for images +.br +\fIposition\fP\^: CARD32 absolute byte position of table in file +.in -.2i +.P +.P +Each chunk in the file has set of common header fields followed by +additional type-specific fields: +.LP +.in +.2i +\fIheader\fP\^: CARD32 bytes in chunk header (including type-specific fields) +.br +\fItype\fP\^: CARD32 must match type in TOC for this chunk +.br +\fIsubtype\fP\^: CARD32 must match subtype in TOC for this chunk +.br +\fIversion\fP\^: CARD32 version number for this chunk type +.in -.2i +.P +There are currently two chunk types defined for cursor files; comments and +images. Comments look like: +.LP +.in +.2i +\fIheader\fP\^: 20 Comment headers are 20 bytes +.br +\fItype\fP\^: 0xfffe0001 Comment type is 0xfffe0001 +.br +\fIsubtype\fP\^: { 1 (COPYRIGHT), 2 (LICENSE), 3 (OTHER) } +.br +\fIversion\fP\^: 1 +.br +\fIlength\fP\^: CARD32 byte length of UTF-8 string +.br +\fIstring\fP\^: LISTofCARD8 UTF-8 string +.in -.2i +.P +Images look like: +.LP +.in +.2i +\fIheader\fP\^: 36 Image headers are 36 bytes +.br +\fItype\fP\^: 0xfffd0002 Image type is 0xfffd0002 +.br +\fIsubtype\fP\^: CARD32 Image subtype is the nominal size +.br +\fIversion\fP\^: 1 +.br +\fIwidth\fP\^: CARD32 Must be less than or equal to 0x7fff +.br +\fIheight\fP\^: CARD32 Must be less than or equal to 0x7fff +.br +\fIxhot\fP\^: CARD32 Must be less than or equal to width +.br +\fIyhot\fP\^: CARD32 Must be less than or equal to height +.br +\fIdelay\fP\^: CARD32 Delay between animation frames in milliseconds +.br +\fIpixels\fP\^: LISTofCARD32 Packed ARGB format pixels +.in -.2i + +.SS THEMES +Xcursor (mostly) follows the freedesktop.org spec for theming icons. The +default search path it uses is $HOME/.icons, __prefix__/share/icons, +__prefix__/share/pixmaps, __ICONDIR__. Within each of these +directories, it searches for a directory using the theme name. Within the +theme directory, it looks for cursor files in the 'cursors' subdirectory. +It uses the first cursor file found along the path. +.PP +If necessary, Xcursor also looks for a "index.theme" file in each theme +directory to find inherited themes and searches along the path for those +themes as well. +.PP +If no theme is set, or if no cursor is found for the specified theme, +Xcursor checks the "default" theme. + +.SH DATATYPES + +.TP +.B XcursorImage +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. +.sp +.nf +.ft CR + typedef struct _XcursorImage { + XcursorDim size; /\(** nominal size for matching */ + XcursorDim width; /\(** actual width */ + XcursorDim height; /\(** actual height */ + XcursorDim xhot; /\(** hot spot x (must be inside image) */ + XcursorDim yhot; /\(** hot spot y (must be inside image) */ + XcursorPixel *pixels; /\(** pointer to pixels */ + } XcursorImage; +.ft +.fi + +.TP +.B XcursorImages +holds multiple XcursorImage structures. They're all freed when the +XcursorImages is freed. +.sp +.nf +.ft CR + typedef struct _XcursorImages { + int nimage; /\(** number of images */ + XcursorImage **images; /\(** array of XcursorImage pointers */ + } XcursorImages; +.ft +.fi + +.TP +.B XcursorCursors +Holds multiple Cursor objects. They're all freed when the XcursorCursors is +freed. These are reference counted so that multiple XcursorAnimate +structures can use the same XcursorCursors. +.sp +.nf +.ft CR + typedef struct _XcursorCursors { + Display *dpy; /\(** Display holding cursors */ + int ref; /\(** reference count */ + int ncursor; /\(** number of cursors */ + Cursor *cursors; /\(** array of cursors */ + } XcursorCursors; +.ft +.fi + +.TP +.B XcursorAnimate +References a set of cursors and a sequence within that set. Multiple +XcursorAnimate structures may reference the same XcursorCursors; each +holds a reference which is removed when the XcursorAnimate is freed. +.sp +.nf +.ft CR + typedef struct _XcursorAnimate { + XcursorCursors *cursors; /\(** list of cursors to use */ + int sequence; /\(** which cursor is next */ + } XcursorAnimate; +.ft +.fi + +.TP +.B XcursorFile +Xcursor provides an abstract API for accessing the file data. Xcursor +provides a stdio implementation of this abstract API; applications +are free to create additional implementations. These functions +parallel the stdio functions in return value and expected argument values; +the read and write functions flip the arguments around to match the POSIX +versions. +.sp +.nf +.ft CR + typedef struct _XcursorFile { + void *closure; + int (*read) (XcursorFile *file, unsigned char *buf, int len); + int (*write) (XcursorFile *file, unsigned char *buf, int len); + int (*seek) (XcursorFile *file, long offset, int whence); + }; +.ft +.fi + +.SH FUNCTIONS + +.SS Object Management +.TP +XcursorImage *XcursorImageCreate (int width, int height) +.TQ +void XcursorImageDestroy (XcursorImage *image) +Allocate and free images. On allocation, the hotspot and the pixels are +left uninitialized. The size is set to the maximum of width and height. + +.TP +XcursorImages *XcursorImagesCreate (int size) +.TQ +void XcursorImagesDestroy (XcursorImages *images) +Allocate and free arrays to hold multiple cursor images. On allocation, +nimage is set to zero. + +.TP +XcursorCursors *XcursorCursorsCreate (Display *dpy, int size) +.TQ +void XcursorCursorsDestroy (XcursorCursors *cursors) +Allocate and free arrays to hold multiple cursors. On allocation, +ncursor is set to zero, ref is set to one. + +.SS Reading and writing images. + +.TP +XcursorImage *XcursorXcFileLoadImage (XcursorFile *file, int size) +.TQ +XcursorImages *XcursorXcFileLoadImages (XcursorFile *file, int size) +.TQ +XcursorImages *XcursorXcFileLoadAllImages (XcursorFile *file) +.TQ +XcursorBool XcursorXcFileLoad (XcursorFile *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorXcFileSave (XcursorFile *file, const XcursorComments *comments, const XcursorImages *images) +These read and write cursors from an XcursorFile handle. After reading, the +file pointer will be left at some random place in the file. + +.TP +XcursorImage *XcursorFileLoadImage (FILE *file, int size) +.TQ +XcursorImages *XcursorFileLoadImages (FILE *file, int size) +.TQ +XcursorImages *XcursorFileLoadAllImages (FILE *file) +.TQ +XcursorBool XcursorFileLoad (FILE *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorFileSaveImages (FILE *file, const XcursorImages *images) +.TQ +XcursorBool XcursorFileSave (FILE * file, const XcursorComments *comments, const XcursorImages *images) +These read and write cursors from a stdio FILE handle. Writing flushes +before returning so that any errors should be detected. + +.TP +XcursorImage *XcursorFilenameLoadImage (const char *filename, int size) +.TQ +XcursorImages *XcursorFilenameLoadImages (const char *filename, int size) +.TQ +XcursorImages *XcursorFilenameLoadAllImages (FILE *file) +.TQ +XcursorBool XcursorFilenameLoad (const char *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorFilenameSaveImages (const char *filename, const XcursorImages *images) +.TQ +XcursorBool XcursorFilenameSave (const char *file, const XcursorComments *comments, const XcursorImages *images) +These parallel the stdio FILE interfaces above, but take filenames. + +.SS Reading library images +.TP +XcursorImage *XcursorLibraryLoadImage (const char *name, const char *theme, int size) +.TQ +XcursorImages *XcursorLibraryLoadImages (const char *name, const char *theme, int size) +These search the library path, loading the first file found. If 'theme' is +not NULL, these functions first try appending -theme to name and then +name alone. + +.SS Cursor APIs + +.TP +Cursor XcursorFilenameLoadCursor (Display *dpy, const char *file) +.TQ +XcursorCursors *XcursorFilenameLoadCursors (Display *dpy, const char *file) +These load cursors from the specified file. + +.TP +Cursor XcursorLibraryLoadCursor (Display *dpy, const char *name) +.TQ +XcursorCursors *XcursorLibraryLoadCursors (Display *dpy, const char *name) +These load cursors using the specified library name. The theme +comes from the display. + +.SS X Cursor Name APIs + +.TP +XcursorImage *XcursorShapeLoadImage (unsigned int shape, const char *theme, int size) +.TQ +XcursorImages *XcursorShapeLoadImages (unsigned int shape, const char *theme, int size) +These map 'shape' to a library name using the standard X cursor names and +then load the images. + +.TP +Cursor XcursorShapeLoadCursor (Display *dpy, unsigned int shape) +.TQ +XcursorCursors *XcursorShapeLoadCursors (Display *dpy, unsigned int shape) +These map 'shape' to a library name and then load the cursors. + +.SS Display Information APIs + +.TP +XcursorBool XcursorSupportsARGB (Display *dpy) +Returns whether the display supports ARGB cursors or whether cursors will be +mapped to a core X cursor. + +.TP +XcursorBool XcursorSetDefaultSize (Display *dpy, int size) +Sets the default size for cursors on the specified display. When loading +cursors, those who's nominal size is closest to this size will be preferred. + +.TP +int XcursorGetDefaultSize (Display *dpy) +Gets the default cursor size. + +.TP +XcursorBool XcursorSetTheme (Display *dpy, const char *theme) +Sets the current theme name. + +.TP +char *XcursorGetTheme (Display *dpy) +Gets the current theme name. + +.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 |