upate to libXcursor 1.1.13
This commit is contained in:
parent
72c5e3259a
commit
30cb7894d9
@ -1,3 +1,91 @@
|
||||
commit 2a9eaf3305d1577ad763d56dddd46e10f8d0676b
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Mar 7 18:54:15 2012 -0800
|
||||
|
||||
libXcursor 1.1.13
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 8229cf75b34c2991eaf973f05326be9bfa16ef0c
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu Nov 24 13:10:15 2011 -0800
|
||||
|
||||
XcursorImageLoadCursor: return failure if _XcursorGetDisplayInfo fails
|
||||
|
||||
Error: Null pointer dereference (CWE 476)
|
||||
Read from null pointer 'info'
|
||||
at line 615 of src/cursor.c in function 'XcursorImageLoadCursor'.
|
||||
Function '_XcursorGetDisplayInfo' may return constant 'NULL' at line 134, called at line 597.
|
||||
Null pointer introduced at line 134 of src/display.c in function '_XcursorGetDisplayInfo'.
|
||||
|
||||
[ This bug was found by the Parfait 0.3.7 bug checking tool.
|
||||
For more information see http://labs.oracle.com/projects/parfait/ ]
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit 2b8d373bddf427bcd95e2595cb64740ebd1d0d30
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu Nov 24 12:59:56 2011 -0800
|
||||
|
||||
XcursorFileSaveImages: plug memory leak on invalid input
|
||||
|
||||
Error: Memory leak (CWE 401)
|
||||
Memory leak of pointer 'comments' allocated with XcursorCommentsCreate(0)
|
||||
at line 982 of src/file.c in function 'XcursorFileSaveImages'.
|
||||
'comments' allocated at line 978 with XcursorCommentsCreate(0).
|
||||
comments leaks when comments != 0 at line 981.
|
||||
|
||||
[ This bug was found by the Parfait 0.3.7 bug checking tool.
|
||||
For more information see http://labs.oracle.com/projects/parfait/ ]
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit bcfb8e8ce56cf47bc6a61bd8c896bafba9e2a9c2
|
||||
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Date: Thu Sep 22 14:43:38 2011 +0100
|
||||
|
||||
Add generated Xcursor.h to .gitignore
|
||||
|
||||
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
Tested-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 862b9ce4aa819bf87b6e24db9d7d5867cbaa577c
|
||||
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Date: Wed Sep 21 20:50:46 2011 +0100
|
||||
|
||||
Fix install of generated Xcursor.h when builddir != srcdir
|
||||
|
||||
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
Tested-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 334dc4f4df69d780f312f23b860df11bee5e9009
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Sep 16 21:41:41 2011 -0700
|
||||
|
||||
Set Xcursor.h version numbers from configure.ac
|
||||
|
||||
Based on similar commit dac73a519816 to libXft
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit e086eb1bf49f2a8c270eaebd5beb595c1dc2973e
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Sep 16 21:26:17 2011 -0700
|
||||
|
||||
Strip trailing whitespace
|
||||
|
||||
Performed with: find * -type f | xargs perl -i -p -e 's{\s+$}{\n}'
|
||||
git diff -w & git diff -b show no diffs from this change
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit d79ddc01e4b247ae95af3581b93aef2b93e76888
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Jun 29 21:41:09 2011 -0700
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
#
|
||||
# Copyright © 2003 Keith Packard, Noah Levitt
|
||||
#
|
||||
#
|
||||
# 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
|
||||
@ -10,7 +10,7 @@
|
||||
# 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
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
#
|
||||
# Copyright © 2003 Keith Packard, Noah Levitt
|
||||
#
|
||||
#
|
||||
# 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
|
||||
@ -26,7 +26,7 @@
|
||||
# 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
|
||||
@ -44,9 +44,9 @@ 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_sh_DATA = ${SHELL} $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = ${SHELL} $(install_sh) -c
|
||||
install_sh_SCRIPT = ${SHELL} $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
@ -59,8 +59,9 @@ build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/xcursor.pc.in $(top_srcdir)/configure AUTHORS \
|
||||
COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \
|
||||
$(srcdir)/xcursor.pc.in $(top_srcdir)/configure \
|
||||
$(top_srcdir)/include/X11/Xcursor/Xcursor.h.in AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
|
||||
install-sh ltmain.sh missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@ -70,7 +71,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_HEADER = config.h $(top_builddir)/include/X11/Xcursor/Xcursor.h
|
||||
CONFIG_CLEAN_FILES = xcursor.pc
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
@ -117,6 +118,7 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_CFLAGS = @BASE_CFLAGS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@ -124,24 +126,20 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
@ -151,6 +149,7 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
@ -161,17 +160,23 @@ LINT = @LINT@
|
||||
LINT_FALSE = @LINT_FALSE@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LINT_TRUE = @LINT_TRUE@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@ -184,20 +189,18 @@ RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XCURSORPATH = @XCURSORPATH@
|
||||
XCURSORPATH_LIST = @XCURSORPATH_LIST@
|
||||
XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
|
||||
XCURSOR_LIBS = @XCURSOR_LIBS@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
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_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
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@
|
||||
@ -295,8 +298,18 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
include/X11/Xcursor/Xcursor.h: include/X11/Xcursor/stamp-h2
|
||||
@if test ! -f $@; then \
|
||||
rm -f include/X11/Xcursor/stamp-h2; \
|
||||
$(MAKE) include/X11/Xcursor/stamp-h2; \
|
||||
else :; fi
|
||||
|
||||
include/X11/Xcursor/stamp-h2: $(top_srcdir)/include/X11/Xcursor/Xcursor.h.in $(top_builddir)/config.status
|
||||
@rm -f include/X11/Xcursor/stamp-h2
|
||||
cd $(top_builddir) && $(SHELL) ./config.status include/X11/Xcursor/Xcursor.h
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
-rm -f config.h stamp-h1 include/X11/Xcursor/Xcursor.h include/X11/Xcursor/stamp-h2
|
||||
xcursor.pc: $(top_builddir)/config.status $(srcdir)/xcursor.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
@ -462,7 +475,7 @@ distclean-tags:
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/.
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/include/X11/Xcursor
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
|
10626
lib/libXcursor/aclocal.m4
vendored
10626
lib/libXcursor/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,10 @@
|
||||
/* Define to 1 if you have Xfixes */
|
||||
#undef HAVE_XFIXES
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -65,3 +69,12 @@
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Major version of libXcursor */
|
||||
#undef XCURSOR_LIB_MAJOR
|
||||
|
||||
/* Minor version of libXcursor */
|
||||
#undef XCURSOR_LIB_MINOR
|
||||
|
||||
/* Micro revision of libXcursor */
|
||||
#undef XCURSOR_LIB_REVISION
|
||||
|
30144
lib/libXcursor/configure
vendored
30144
lib/libXcursor/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -24,14 +24,12 @@
|
||||
AC_PREREQ([2.60])
|
||||
#
|
||||
# This is the package version number, not the shared library
|
||||
# version. This same version number must appear in Xcursor.h
|
||||
# Yes, it is a pain to synchronize version numbers. Unfortunately, it's
|
||||
# not possible to extract the version number here from Xcursor.h
|
||||
# version. This version number will be substituted into Xcursor.h
|
||||
#
|
||||
AC_INIT([libXcursor], [1.1.12],
|
||||
AC_INIT([libXcursor], [1.1.13],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h])
|
||||
|
||||
# Initialize Automake
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
@ -46,6 +44,19 @@ m4_ifndef([XORG_MACROS_VERSION],
|
||||
XORG_MACROS_VERSION(1.8)
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
# Set library version for Xcursor.h from package version set in AC_INIT
|
||||
# copied from PACKAGE_VERSION_* settings in XORG_VERSION
|
||||
AC_DEFINE_UNQUOTED([XCURSOR_LIB_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
[Major version of libXcursor])
|
||||
AC_DEFINE_UNQUOTED([XCURSOR_LIB_MINOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`],
|
||||
[Minor version of libXcursor])
|
||||
AC_DEFINE_UNQUOTED([XCURSOR_LIB_REVISION],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`],
|
||||
[Micro revision of libXcursor])
|
||||
|
||||
|
||||
AC_ARG_WITH(icondir,
|
||||
AS_HELP_STRING([--with-icondir=<path>],
|
||||
[Set default icon directory (default: ${datadir}/icons)]),
|
||||
|
@ -69,14 +69,13 @@ typedef XcursorUInt XcursorPixel;
|
||||
#define XCURSOR_MAGIC 0x72756358 /* "Xcur" LSBFirst */
|
||||
|
||||
/*
|
||||
* Current Xcursor version number. This same number
|
||||
* must appear in the Xcursor configure.ac file. Yes,
|
||||
* it'a a pain to synchronize version numbers like this.
|
||||
* Current Xcursor version number. Will be substituted by configure
|
||||
* from the version in the libXcursor configure.ac file.
|
||||
*/
|
||||
|
||||
#define XCURSOR_LIB_MAJOR 1
|
||||
#define XCURSOR_LIB_MINOR 1
|
||||
#define XCURSOR_LIB_REVISION 9
|
||||
#undef XCURSOR_LIB_MAJOR
|
||||
#undef XCURSOR_LIB_MINOR
|
||||
#undef XCURSOR_LIB_REVISION
|
||||
#define XCURSOR_LIB_VERSION ((XCURSOR_LIB_MAJOR * 10000) + \
|
||||
(XCURSOR_LIB_MINOR * 100) + \
|
||||
(XCURSOR_LIB_REVISION))
|
||||
@ -239,7 +238,7 @@ void
|
||||
XcursorImageDestroy (XcursorImage *image);
|
||||
|
||||
/*
|
||||
* Manage Images objects
|
||||
* Manage Images objects
|
||||
*/
|
||||
XcursorImages *
|
||||
XcursorImagesCreate (int size);
|
||||
@ -304,7 +303,7 @@ XcursorXcFileLoad (XcursorFile *file,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
@ -321,15 +320,15 @@ XcursorImages *
|
||||
XcursorFileLoadAllImages (FILE *file);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSaveImages (FILE *file, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSave (FILE * file,
|
||||
XcursorFileSave (FILE * file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
@ -354,7 +353,7 @@ XcursorBool
|
||||
XcursorFilenameSaveImages (const char *filename, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSave (const char *file,
|
||||
XcursorFilenameSave (const char *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
@ -376,7 +375,7 @@ XcursorLibraryPath (void);
|
||||
|
||||
int
|
||||
XcursorLibraryShape (const char *library);
|
||||
|
||||
|
||||
/*
|
||||
* Image/Cursor APIs
|
||||
*/
|
||||
@ -465,7 +464,7 @@ XcursorTryShapeBitmapCursor (Display *dpy,
|
||||
#define XCURSOR_BITMAP_HASH_SIZE 16
|
||||
|
||||
void
|
||||
XcursorImageHash (XImage *image,
|
||||
XcursorImageHash (XImage *image,
|
||||
unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]);
|
||||
|
||||
/*
|
10136
lib/libXcursor/ltmain.sh
10136
lib/libXcursor/ltmain.sh
File diff suppressed because it is too large
Load Diff
@ -23,9 +23,9 @@ 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_sh_DATA = ${SHELL} $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = ${SHELL} $(install_sh) -c
|
||||
install_sh_SCRIPT = ${SHELL} $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
@ -43,7 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_HEADER = $(top_builddir)/config.h \
|
||||
$(top_builddir)/include/X11/Xcursor/Xcursor.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
@ -71,6 +72,7 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_CFLAGS = @BASE_CFLAGS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@ -78,24 +80,20 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
@ -105,6 +103,7 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
@ -115,19 +114,27 @@ LINT = @LINT@
|
||||
LINT_FALSE = @LINT_FALSE@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LINT_TRUE = @LINT_TRUE@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
|
||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
||||
MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__XCURSORPATH__|$(XCURSORPATH_LIST)|g'
|
||||
# 's/:/, /g' will add comma and a space to help path formatting
|
||||
MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__XCURSORPATH__|$(XCURSORPATH)|g' -e \
|
||||
'\|$(XCURSORPATH)| s/:/, /g'
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@ -140,20 +147,18 @@ RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XCURSORPATH = @XCURSORPATH@
|
||||
XCURSORPATH_LIST = @XCURSORPATH_LIST@
|
||||
XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
|
||||
XCURSOR_LIBS = @XCURSOR_LIBS@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
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_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
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@
|
||||
|
@ -276,7 +276,7 @@ XcursorBool XcursorXcFileLoad (XcursorFile *file, XcursorComments **commentsp, X
|
||||
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
|
||||
@ -372,7 +372,7 @@ Gets the current theme name.
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.TP 15
|
||||
.B XCURSOR_PATH
|
||||
This variable sets the list of paths to look for cursors in.
|
||||
This variable sets the list of paths to look for cursors in.
|
||||
Directories in this path are separated by colons (:).
|
||||
|
||||
.SH RESTRICTIONS
|
||||
|
@ -20,7 +20,7 @@ INCLUDES = -I$(top_srcdir)/include/X11/Xcursor
|
||||
libXcursor_la_LDFLAGS = -version-number 1:0:2 -no-undefined
|
||||
|
||||
libXcursorincludedir = $(includedir)/X11/Xcursor
|
||||
libXcursorinclude_HEADERS = $(top_srcdir)/include/X11/Xcursor/Xcursor.h
|
||||
libXcursorinclude_HEADERS = $(top_builddir)/include/X11/Xcursor/Xcursor.h
|
||||
|
||||
if LINT
|
||||
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
|
@ -24,9 +24,9 @@ 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_sh_DATA = ${SHELL} $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = ${SHELL} $(install_sh) -c
|
||||
install_sh_SCRIPT = ${SHELL} $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
@ -45,7 +45,8 @@ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_HEADER = $(top_builddir)/config.h \
|
||||
$(top_builddir)/include/X11/Xcursor/Xcursor.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
@ -62,7 +63,7 @@ libXcursor_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
am_libXcursor_la_OBJECTS = cursor.lo display.lo file.lo library.lo \
|
||||
xlib.lo
|
||||
libXcursor_la_OBJECTS = $(am_libXcursor_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/include/X11/Xcursor
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
@ -94,6 +95,7 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_CFLAGS = @BASE_CFLAGS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@ -101,24 +103,20 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
@ -128,6 +126,7 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
@ -138,17 +137,23 @@ LINT = @LINT@
|
||||
LINT_FALSE = @LINT_FALSE@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LINT_TRUE = @LINT_TRUE@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@ -161,20 +166,18 @@ RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XCURSORPATH = @XCURSORPATH@
|
||||
XCURSORPATH_LIST = @XCURSORPATH_LIST@
|
||||
XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
|
||||
XCURSOR_LIBS = @XCURSOR_LIBS@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
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_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
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@
|
||||
@ -231,7 +234,7 @@ INCLUDES = -I$(top_srcdir)/include/X11/Xcursor
|
||||
#
|
||||
libXcursor_la_LDFLAGS = -version-number 1:0:2 -no-undefined
|
||||
libXcursorincludedir = $(includedir)/X11/Xcursor
|
||||
libXcursorinclude_HEADERS = $(top_srcdir)/include/X11/Xcursor/Xcursor.h
|
||||
libXcursorinclude_HEADERS = $(top_builddir)/include/X11/Xcursor/Xcursor.h
|
||||
@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
|
||||
|
||||
@ -407,7 +410,7 @@ distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(mkdir_p) $(distdir)/../include/X11/Xcursor
|
||||
$(mkdir_p) $(distdir)/$(top_builddir)/include/X11/Xcursor
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
|
@ -51,7 +51,7 @@ XcursorCursorsDestroy (XcursorCursors *cursors)
|
||||
--cursors->ref;
|
||||
if (cursors->ref > 0)
|
||||
return;
|
||||
|
||||
|
||||
for (n = 0; n < cursors->ncursor; n++)
|
||||
XFreeCursor (cursors->dpy, cursors->cursors[n]);
|
||||
free (cursors);
|
||||
@ -238,17 +238,17 @@ _XcursorHeckbertMedianCut (const XcursorImage *image, XcursorCoreCursor *core)
|
||||
XcursorPixel leftColor, centerColor, rightColor;
|
||||
int (*compare) (const void *, const void *);
|
||||
int x, y;
|
||||
|
||||
|
||||
/*
|
||||
* Temp space for converted image and converted colors
|
||||
*/
|
||||
temp = malloc (npixels * sizeof (XcursorPixel) * 2);
|
||||
if (!temp)
|
||||
return False;
|
||||
|
||||
|
||||
pixels = temp;
|
||||
colors = pixels + npixels;
|
||||
|
||||
|
||||
/*
|
||||
* Convert to 2-value alpha and build
|
||||
* array of opaque color values and an
|
||||
@ -286,7 +286,7 @@ _XcursorHeckbertMedianCut (const XcursorImage *image, XcursorCoreCursor *core)
|
||||
*pn++ = p;
|
||||
}
|
||||
ncolors = pc - colors;
|
||||
|
||||
|
||||
/*
|
||||
* Compute longest dimension and sort
|
||||
*/
|
||||
@ -468,16 +468,16 @@ _XcursorFloydSteinberg (const XcursorImage *image, XcursorCoreCursor *core)
|
||||
iErrorRight = (iError * 7) >> 4;
|
||||
iErrorBelowLeft = (iError * 3) >> 4;
|
||||
iErrorBelow = (iError * 5) >> 4;
|
||||
iErrorBelowRight = (iError - iErrorRight -
|
||||
iErrorBelowRight = (iError - iErrorRight -
|
||||
iErrorBelowLeft - iErrorBelow);
|
||||
aErrorRight = (aError * 7) >> 4;
|
||||
aErrorBelowLeft = (aError * 3) >> 4;
|
||||
aErrorBelow = (aError * 5) >> 4;
|
||||
aErrorBelowRight = (aError - aErrorRight -
|
||||
aErrorBelowRight = (aError - aErrorRight -
|
||||
aErrorBelowLeft - aErrorBelow);
|
||||
if (x < image->width - 1)
|
||||
{
|
||||
iP[right] += iErrorRight;
|
||||
iP[right] += iErrorRight;
|
||||
aP[right] += aErrorRight;
|
||||
}
|
||||
if (y < image->height - 1)
|
||||
@ -500,9 +500,9 @@ _XcursorFloydSteinberg (const XcursorImage *image, XcursorCoreCursor *core)
|
||||
}
|
||||
free (iPicture);
|
||||
core->on_color.red =
|
||||
core->on_color.green =
|
||||
core->on_color.green =
|
||||
core->on_color.blue = (min_inten | min_inten << 8);
|
||||
core->off_color.red =
|
||||
core->off_color.red =
|
||||
core->off_color.green =
|
||||
core->off_color.blue = (max_inten | max_inten << 8);
|
||||
return True;
|
||||
@ -537,9 +537,9 @@ _XcursorThreshold (const XcursorImage *image, XcursorCoreCursor *core)
|
||||
}
|
||||
}
|
||||
core->on_color.red =
|
||||
core->on_color.green =
|
||||
core->on_color.green =
|
||||
core->on_color.blue = 0;
|
||||
core->off_color.red =
|
||||
core->off_color.red =
|
||||
core->off_color.green =
|
||||
core->off_color.blue = 0xffff;
|
||||
return True;
|
||||
@ -549,7 +549,7 @@ Cursor
|
||||
XcursorImageLoadCursor (Display *dpy, const XcursorImage *image)
|
||||
{
|
||||
Cursor cursor;
|
||||
|
||||
|
||||
#if RENDER_MAJOR > 0 || RENDER_MINOR >= 5
|
||||
if (XcursorSupportsARGB (dpy))
|
||||
{
|
||||
@ -581,13 +581,13 @@ XcursorImageLoadCursor (Display *dpy, const XcursorImage *image)
|
||||
pixmap = XCreatePixmap (dpy, RootWindow (dpy, screen),
|
||||
image->width, image->height, 32);
|
||||
gc = XCreateGC (dpy, pixmap, 0, NULL);
|
||||
XPutImage (dpy, pixmap, gc, &ximage,
|
||||
XPutImage (dpy, pixmap, gc, &ximage,
|
||||
0, 0, 0, 0, image->width, image->height);
|
||||
XFreeGC (dpy, gc);
|
||||
format = XRenderFindStandardFormat (dpy, PictStandardARGB32);
|
||||
picture = XRenderCreatePicture (dpy, pixmap, format, 0, NULL);
|
||||
XFreePixmap (dpy, pixmap);
|
||||
cursor = XRenderCreateCursor (dpy, picture,
|
||||
cursor = XRenderCreateCursor (dpy, picture,
|
||||
image->xhot, image->yhot);
|
||||
XRenderFreePicture (dpy, picture);
|
||||
}
|
||||
@ -601,15 +601,18 @@ XcursorImageLoadCursor (Display *dpy, const XcursorImage *image)
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
if (!info)
|
||||
return 0;
|
||||
|
||||
core.src_image = XCreateImage (dpy, NULL, 1, ZPixmap,
|
||||
0, NULL, image->width, image->height,
|
||||
32, 0);
|
||||
core.src_image->data = Xmalloc (image->height *
|
||||
core.src_image->data = Xmalloc (image->height *
|
||||
core.src_image->bytes_per_line);
|
||||
core.msk_image = XCreateImage (dpy, NULL, 1, ZPixmap,
|
||||
0, NULL, image->width, image->height,
|
||||
32, 0);
|
||||
core.msk_image->data = Xmalloc (image->height *
|
||||
core.msk_image->data = Xmalloc (image->height *
|
||||
core.msk_image->bytes_per_line);
|
||||
|
||||
switch (info->dither) {
|
||||
@ -642,16 +645,16 @@ XcursorImageLoadCursor (Display *dpy, const XcursorImage *image)
|
||||
image->width, image->height, 1);
|
||||
gcv.foreground = 1;
|
||||
gcv.background = 0;
|
||||
gc = XCreateGC (dpy, src_pixmap,
|
||||
gc = XCreateGC (dpy, src_pixmap,
|
||||
GCForeground|GCBackground,
|
||||
&gcv);
|
||||
XPutImage (dpy, src_pixmap, gc, core.src_image,
|
||||
0, 0, 0, 0, image->width, image->height);
|
||||
|
||||
|
||||
XPutImage (dpy, msk_pixmap, gc, core.msk_image,
|
||||
0, 0, 0, 0, image->width, image->height);
|
||||
XFreeGC (dpy, gc);
|
||||
|
||||
|
||||
#ifdef DEBUG_IMAGE
|
||||
_XcursorDumpColor (&core.on_color, "on_color");
|
||||
_XcursorDumpColor (&core.off_color, "off_color");
|
||||
@ -702,7 +705,7 @@ XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images)
|
||||
XcursorCursors *cursors = XcursorImagesLoadCursors (dpy, images);
|
||||
XAnimCursor *anim;
|
||||
int n;
|
||||
|
||||
|
||||
if (!cursors)
|
||||
return 0;
|
||||
anim = malloc (cursors->ncursor * sizeof (XAnimCursor));
|
||||
@ -734,7 +737,7 @@ XcursorFilenameLoadCursor (Display *dpy, const char *file)
|
||||
int size = XcursorGetDefaultSize (dpy);
|
||||
XcursorImages *images = XcursorFilenameLoadImages (file, size);
|
||||
Cursor cursor;
|
||||
|
||||
|
||||
if (!images)
|
||||
return None;
|
||||
cursor = XcursorImagesLoadCursor (dpy, images);
|
||||
@ -748,7 +751,7 @@ XcursorFilenameLoadCursors (Display *dpy, const char *file)
|
||||
int size = XcursorGetDefaultSize (dpy);
|
||||
XcursorImages *images = XcursorFilenameLoadImages (file, size);
|
||||
XcursorCursors *cursors;
|
||||
|
||||
|
||||
if (!images)
|
||||
return NULL;
|
||||
cursors = XcursorImagesLoadCursors (dpy, images);
|
||||
@ -768,7 +771,7 @@ _XcursorCreateGlyphCursor(Display *dpy,
|
||||
unsigned int mask_char,
|
||||
XColor _Xconst *foreground,
|
||||
XColor _Xconst *background)
|
||||
{
|
||||
{
|
||||
Cursor cid;
|
||||
register xCreateGlyphCursorReq *req;
|
||||
|
||||
@ -800,21 +803,21 @@ _XcursorCreateFontCursor (Display *dpy, unsigned int shape)
|
||||
static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */
|
||||
static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */
|
||||
|
||||
/*
|
||||
/*
|
||||
* the cursor font contains the shape glyph followed by the mask
|
||||
* glyph; so character position 0 contains a shape, 1 the mask for 0,
|
||||
* 2 a shape, etc. <X11/cursorfont.h> contains hash define names
|
||||
* for all of these.
|
||||
*/
|
||||
|
||||
if (dpy->cursor_font == None)
|
||||
if (dpy->cursor_font == None)
|
||||
{
|
||||
dpy->cursor_font = XLoadFont (dpy, CURSORFONT);
|
||||
if (dpy->cursor_font == None)
|
||||
return None;
|
||||
}
|
||||
|
||||
return _XcursorCreateGlyphCursor (dpy, dpy->cursor_font, dpy->cursor_font,
|
||||
return _XcursorCreateGlyphCursor (dpy, dpy->cursor_font, dpy->cursor_font,
|
||||
shape, shape + 1, &foreground, &background);
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
return NULL;
|
||||
info->next = NULL;
|
||||
info->display = dpy;
|
||||
|
||||
|
||||
info->codes = XAddExtension (dpy);
|
||||
if (!info->codes)
|
||||
{
|
||||
@ -162,7 +162,7 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
info->has_anim_cursor = XcursorFalse;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
info->size = 0;
|
||||
|
||||
/*
|
||||
@ -173,7 +173,7 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
v = XGetDefault (dpy, "Xcursor", "size");
|
||||
if (v)
|
||||
info->size = atoi (v);
|
||||
|
||||
|
||||
/*
|
||||
* Use the Xft size to guess a size; make cursors 16 "points" tall
|
||||
*/
|
||||
@ -186,15 +186,15 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
if (dpi)
|
||||
info->size = dpi * 16 / 72;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Use display size to guess a size
|
||||
*/
|
||||
if (info->size == 0)
|
||||
{
|
||||
int dim;
|
||||
|
||||
if (DisplayHeight (dpy, DefaultScreen (dpy)) <
|
||||
|
||||
if (DisplayHeight (dpy, DefaultScreen (dpy)) <
|
||||
DisplayWidth (dpy, DefaultScreen (dpy)))
|
||||
dim = DisplayHeight (dpy, DefaultScreen (dpy));
|
||||
else
|
||||
@ -204,7 +204,7 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
*/
|
||||
info->size = dim / 48;
|
||||
}
|
||||
|
||||
|
||||
info->theme = NULL;
|
||||
info->theme_from_config = NULL;
|
||||
|
||||
@ -287,7 +287,7 @@ _XcursorGetDisplayInfo (Display *dpy)
|
||||
_XcursorDisplayInfo = info;
|
||||
}
|
||||
_XUnlockMutex (_Xglobal_lock);
|
||||
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ XcursorGetThemeCore (Display *dpy)
|
||||
if (!info)
|
||||
return XcursorFalse;
|
||||
return info->theme_core;
|
||||
|
||||
|
||||
}
|
||||
|
||||
XcursorBool
|
||||
|
@ -53,7 +53,7 @@ XcursorImagesCreate (int size)
|
||||
{
|
||||
XcursorImages *images;
|
||||
|
||||
images = malloc (sizeof (XcursorImages) +
|
||||
images = malloc (sizeof (XcursorImages) +
|
||||
size * sizeof (XcursorImage *));
|
||||
if (!images)
|
||||
return NULL;
|
||||
@ -82,10 +82,10 @@ void
|
||||
XcursorImagesSetName (XcursorImages *images, const char *name)
|
||||
{
|
||||
char *new;
|
||||
|
||||
|
||||
if (!images || !name)
|
||||
return;
|
||||
|
||||
|
||||
new = malloc (strlen (name) + 1);
|
||||
|
||||
if (!new)
|
||||
@ -180,7 +180,7 @@ _XcursorWriteUInt (XcursorFile *file, XcursorUInt u)
|
||||
|
||||
if (!file)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
bytes[0] = u;
|
||||
bytes[1] = u >> 8;
|
||||
bytes[2] = u >> 16;
|
||||
@ -232,7 +232,7 @@ _XcursorReadFileHeader (XcursorFile *file)
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (!_XcursorReadUInt (file, &head.magic))
|
||||
return NULL;
|
||||
if (head.magic != XCURSOR_MAGIC)
|
||||
@ -274,7 +274,7 @@ _XcursorReadFileHeader (XcursorFile *file)
|
||||
static XcursorUInt
|
||||
_XcursorFileHeaderLength (XcursorFileHeader *fileHeader)
|
||||
{
|
||||
return (XCURSOR_FILE_HEADER_LEN +
|
||||
return (XCURSOR_FILE_HEADER_LEN +
|
||||
fileHeader->ntoc * XCURSOR_FILE_TOC_LEN);
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ _XcursorWriteFileHeader (XcursorFile *file, XcursorFileHeader *fileHeader)
|
||||
|
||||
if (!file || !fileHeader)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
if (!_XcursorWriteUInt (file, fileHeader->magic))
|
||||
return XcursorFalse;
|
||||
if (!_XcursorWriteUInt (file, fileHeader->header))
|
||||
@ -307,7 +307,7 @@ _XcursorWriteFileHeader (XcursorFile *file, XcursorFileHeader *fileHeader)
|
||||
}
|
||||
|
||||
static XcursorBool
|
||||
_XcursorSeekToToc (XcursorFile *file,
|
||||
_XcursorSeekToToc (XcursorFile *file,
|
||||
XcursorFileHeader *fileHeader,
|
||||
int toc)
|
||||
{
|
||||
@ -423,7 +423,7 @@ _XcursorFindImageToc (XcursorFileHeader *fileHeader,
|
||||
}
|
||||
|
||||
static XcursorImage *
|
||||
_XcursorReadImage (XcursorFile *file,
|
||||
_XcursorReadImage (XcursorFile *file,
|
||||
XcursorFileHeader *fileHeader,
|
||||
int toc)
|
||||
{
|
||||
@ -455,7 +455,7 @@ _XcursorReadImage (XcursorFile *file,
|
||||
return NULL;
|
||||
if (head.xhot > head.width || head.yhot > head.height)
|
||||
return NULL;
|
||||
|
||||
|
||||
/* Create the image and initialize it */
|
||||
image = XcursorImageCreate (head.width, head.height);
|
||||
if (chunkHeader.version < image->version)
|
||||
@ -488,7 +488,7 @@ _XcursorImageLength (XcursorImage *image)
|
||||
}
|
||||
|
||||
static XcursorBool
|
||||
_XcursorWriteImage (XcursorFile *file,
|
||||
_XcursorWriteImage (XcursorFile *file,
|
||||
XcursorFileHeader *fileHeader,
|
||||
int toc,
|
||||
XcursorImage *image)
|
||||
@ -508,16 +508,16 @@ _XcursorWriteImage (XcursorFile *file,
|
||||
return XcursorFalse;
|
||||
if (image->xhot > image->width || image->yhot > image->height)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
/* write chunk header */
|
||||
chunkHeader.header = XCURSOR_IMAGE_HEADER_LEN;
|
||||
chunkHeader.type = XCURSOR_IMAGE_TYPE;
|
||||
chunkHeader.subtype = image->size;
|
||||
chunkHeader.version = XCURSOR_IMAGE_VERSION;
|
||||
|
||||
|
||||
if (!_XcursorFileWriteChunkHeader (file, fileHeader, toc, &chunkHeader))
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
/* write extra image header fields */
|
||||
if (!_XcursorWriteUInt (file, image->width))
|
||||
return XcursorFalse;
|
||||
@ -529,7 +529,7 @@ _XcursorWriteImage (XcursorFile *file,
|
||||
return XcursorFalse;
|
||||
if (!_XcursorWriteUInt (file, image->delay))
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
/* write the image */
|
||||
n = image->width * image->height;
|
||||
p = image->pixels;
|
||||
@ -543,7 +543,7 @@ _XcursorWriteImage (XcursorFile *file,
|
||||
}
|
||||
|
||||
static XcursorComment *
|
||||
_XcursorReadComment (XcursorFile *file,
|
||||
_XcursorReadComment (XcursorFile *file,
|
||||
XcursorFileHeader *fileHeader,
|
||||
int toc)
|
||||
{
|
||||
@ -579,7 +579,7 @@ _XcursorCommentLength (XcursorComment *comment)
|
||||
}
|
||||
|
||||
static XcursorBool
|
||||
_XcursorWriteComment (XcursorFile *file,
|
||||
_XcursorWriteComment (XcursorFile *file,
|
||||
XcursorFileHeader *fileHeader,
|
||||
int toc,
|
||||
XcursorComment *comment)
|
||||
@ -591,24 +591,24 @@ _XcursorWriteComment (XcursorFile *file,
|
||||
return XcursorFalse;
|
||||
|
||||
length = strlen (comment->comment);
|
||||
|
||||
|
||||
/* sanity check data */
|
||||
if (length > XCURSOR_COMMENT_MAX_LEN)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
/* read chunk header */
|
||||
chunkHeader.header = XCURSOR_COMMENT_HEADER_LEN;
|
||||
chunkHeader.type = XCURSOR_COMMENT_TYPE;
|
||||
chunkHeader.subtype = comment->comment_type;
|
||||
chunkHeader.version = XCURSOR_COMMENT_VERSION;
|
||||
|
||||
|
||||
if (!_XcursorFileWriteChunkHeader (file, fileHeader, toc, &chunkHeader))
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
/* write extra comment header fields */
|
||||
if (!_XcursorWriteUInt (file, length))
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
if (!_XcursorWriteBytes (file, comment->comment, length))
|
||||
return XcursorFalse;
|
||||
return XcursorTrue;
|
||||
@ -622,7 +622,7 @@ XcursorXcFileLoadImage (XcursorFile *file, int size)
|
||||
int nsize;
|
||||
int toc;
|
||||
XcursorImage *image;
|
||||
|
||||
|
||||
if (size < 0)
|
||||
return NULL;
|
||||
fileHeader = _XcursorReadFileHeader (file);
|
||||
@ -648,7 +648,7 @@ XcursorXcFileLoadImages (XcursorFile *file, int size)
|
||||
XcursorImages *images;
|
||||
int n;
|
||||
int toc;
|
||||
|
||||
|
||||
if (!file || size < 0)
|
||||
return NULL;
|
||||
fileHeader = _XcursorReadFileHeader (file);
|
||||
@ -671,7 +671,7 @@ XcursorXcFileLoadImages (XcursorFile *file, int size)
|
||||
toc = _XcursorFindImageToc (fileHeader, bestSize, n);
|
||||
if (toc < 0)
|
||||
break;
|
||||
images->images[images->nimage] = _XcursorReadImage (file, fileHeader,
|
||||
images->images[images->nimage] = _XcursorReadImage (file, fileHeader,
|
||||
toc);
|
||||
if (!images->images[images->nimage])
|
||||
break;
|
||||
@ -695,10 +695,10 @@ XcursorXcFileLoadAllImages (XcursorFile *file)
|
||||
int nimage;
|
||||
int n;
|
||||
int toc;
|
||||
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
|
||||
fileHeader = _XcursorReadFileHeader (file);
|
||||
if (!fileHeader)
|
||||
return NULL;
|
||||
@ -752,7 +752,7 @@ XcursorXcFileLoad (XcursorFile *file,
|
||||
XcursorComment *comment;
|
||||
XcursorComments *comments;
|
||||
int toc;
|
||||
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
fileHeader = _XcursorReadFileHeader (file);
|
||||
@ -816,7 +816,7 @@ XcursorXcFileLoad (XcursorFile *file,
|
||||
}
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images)
|
||||
{
|
||||
@ -824,21 +824,21 @@ XcursorXcFileSave (XcursorFile *file,
|
||||
XcursorUInt position;
|
||||
int n;
|
||||
int toc;
|
||||
|
||||
|
||||
if (!file || !comments || !images)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
fileHeader = _XcursorFileHeaderCreate (comments->ncomment + images->nimage);
|
||||
if (!fileHeader)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
position = _XcursorFileHeaderLength (fileHeader);
|
||||
|
||||
/*
|
||||
* Compute the toc. Place the images before the comments
|
||||
* as they're more often read
|
||||
*/
|
||||
|
||||
|
||||
toc = 0;
|
||||
for (n = 0; n < images->nimage; n++)
|
||||
{
|
||||
@ -848,7 +848,7 @@ XcursorXcFileSave (XcursorFile *file,
|
||||
position += _XcursorImageLength (images->images[n]);
|
||||
toc++;
|
||||
}
|
||||
|
||||
|
||||
for (n = 0; n < comments->ncomment; n++)
|
||||
{
|
||||
fileHeader->tocs[toc].type = XCURSOR_COMMENT_TYPE;
|
||||
@ -857,13 +857,13 @@ XcursorXcFileSave (XcursorFile *file,
|
||||
position += _XcursorCommentLength (comments->comments[n]);
|
||||
toc++;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the header and the toc
|
||||
*/
|
||||
if (!_XcursorWriteFileHeader (file, fileHeader))
|
||||
goto bail;
|
||||
|
||||
|
||||
/*
|
||||
* Write the images
|
||||
*/
|
||||
@ -874,7 +874,7 @@ XcursorXcFileSave (XcursorFile *file,
|
||||
goto bail;
|
||||
toc++;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the comments
|
||||
*/
|
||||
@ -884,7 +884,7 @@ XcursorXcFileSave (XcursorFile *file,
|
||||
goto bail;
|
||||
toc++;
|
||||
}
|
||||
|
||||
|
||||
_XcursorFileHeaderDestroy (fileHeader);
|
||||
return XcursorTrue;
|
||||
bail:
|
||||
@ -959,8 +959,8 @@ XcursorFileLoadAllImages (FILE *file)
|
||||
}
|
||||
|
||||
XcursorBool
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp)
|
||||
{
|
||||
XcursorFile f;
|
||||
@ -975,10 +975,13 @@ XcursorFileLoad (FILE *file,
|
||||
XcursorBool
|
||||
XcursorFileSaveImages (FILE *file, const XcursorImages *images)
|
||||
{
|
||||
XcursorComments *comments = XcursorCommentsCreate (0);
|
||||
XcursorComments *comments;
|
||||
XcursorFile f;
|
||||
XcursorBool ret;
|
||||
if (!comments || !file || !images)
|
||||
|
||||
if (!file || !images)
|
||||
return 0;
|
||||
if ((comments = XcursorCommentsCreate (0)) == NULL)
|
||||
return 0;
|
||||
_XcursorStdioFileInitialize (file, &f);
|
||||
ret = XcursorXcFileSave (&f, comments, images) && fflush (file) != EOF;
|
||||
@ -987,7 +990,7 @@ XcursorFileSaveImages (FILE *file, const XcursorImages *images)
|
||||
}
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSave (FILE * file,
|
||||
XcursorFileSave (FILE * file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images)
|
||||
{
|
||||
@ -995,7 +998,7 @@ XcursorFileSave (FILE * file,
|
||||
|
||||
if (!file || !comments || !images)
|
||||
return XcursorFalse;
|
||||
|
||||
|
||||
_XcursorStdioFileInitialize (file, &f);
|
||||
return XcursorXcFileSave (&f, comments, images) && fflush (file) != EOF;
|
||||
}
|
||||
@ -1025,7 +1028,7 @@ XcursorFilenameLoadImages (const char *file, int size)
|
||||
|
||||
if (!file || size < 0)
|
||||
return NULL;
|
||||
|
||||
|
||||
f = fopen (file, "r");
|
||||
if (!f)
|
||||
return NULL;
|
||||
@ -1087,7 +1090,7 @@ XcursorFilenameSaveImages (const char *file, const XcursorImages *images)
|
||||
}
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSave (const char *file,
|
||||
XcursorFilenameSave (const char *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ static void
|
||||
_XcursorAddPathElt (char *path, const char *elt, int len)
|
||||
{
|
||||
int pathlen = strlen (path);
|
||||
|
||||
|
||||
/* append / if the path doesn't currently have one */
|
||||
if (path[0] == '\0' || path[pathlen - 1] != '/')
|
||||
{
|
||||
@ -83,11 +83,11 @@ _XcursorBuildThemeDir (const char *dir, const char *theme)
|
||||
|
||||
if (!dir || !theme)
|
||||
return NULL;
|
||||
|
||||
|
||||
colon = strchr (dir, ':');
|
||||
if (!colon)
|
||||
colon = dir + strlen (dir);
|
||||
|
||||
|
||||
dirlen = colon - dir;
|
||||
|
||||
tcolon = strchr (theme, ':');
|
||||
@ -95,7 +95,7 @@ _XcursorBuildThemeDir (const char *dir, const char *theme)
|
||||
tcolon = theme + strlen (theme);
|
||||
|
||||
themelen = tcolon - theme;
|
||||
|
||||
|
||||
home = NULL;
|
||||
homelen = 0;
|
||||
if (*dir == '~')
|
||||
@ -113,7 +113,7 @@ _XcursorBuildThemeDir (const char *dir, const char *theme)
|
||||
* and one for the trailing null
|
||||
*/
|
||||
len = 1 + homelen + 1 + dirlen + 1 + themelen + 1;
|
||||
|
||||
|
||||
full = malloc (len);
|
||||
if (!full)
|
||||
return NULL;
|
||||
@ -184,14 +184,14 @@ _XcursorThemeInherits (const char *full)
|
||||
if (result)
|
||||
{
|
||||
r = result;
|
||||
while (*l)
|
||||
while (*l)
|
||||
{
|
||||
while (XcursorSep(*l) || XcursorWhite (*l)) l++;
|
||||
if (!*l)
|
||||
break;
|
||||
if (r != result)
|
||||
*r++ = ':';
|
||||
while (*l && !XcursorWhite(*l) &&
|
||||
while (*l && !XcursorWhite(*l) &&
|
||||
!XcursorSep(*l))
|
||||
*r++ = *l++;
|
||||
}
|
||||
@ -324,7 +324,7 @@ XcursorLibraryLoadCursor (Display *dpy, const char *file)
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
|
||||
|
||||
if (!images)
|
||||
{
|
||||
int id = XcursorLibraryShape (file);
|
||||
@ -349,10 +349,10 @@ XcursorLibraryLoadCursors (Display *dpy, const char *file)
|
||||
char *theme = XcursorGetTheme (dpy);
|
||||
XcursorImages *images = XcursorLibraryLoadImages (file, theme, size);
|
||||
XcursorCursors *cursors;
|
||||
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (!images)
|
||||
{
|
||||
int id = XcursorLibraryShape (file);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
@ -53,7 +53,7 @@ typedef struct _XcursorFontInfo {
|
||||
* Xcursor computes a hash value for the source image
|
||||
* and tries to load a library cursor of that name.
|
||||
*/
|
||||
|
||||
|
||||
/* large bitmaps are unlikely to be cursors */
|
||||
#define MAX_BITMAP_CURSOR_SIZE 64
|
||||
/* don't need to remember very many; in fact, 2 is likely sufficient */
|
||||
@ -103,5 +103,5 @@ _XcursorCreateGlyphCursor(Display *dpy,
|
||||
|
||||
Cursor
|
||||
_XcursorCreateFontCursor (Display *dpy, unsigned int shape);
|
||||
|
||||
|
||||
#endif /* _XCURSORINT_H_ */
|
||||
|
@ -92,11 +92,11 @@ XcursorTryShapeCursor (Display *dpy,
|
||||
|
||||
if (!dpy || !source_font || !mask_font || !foreground || !background)
|
||||
return 0;
|
||||
|
||||
|
||||
if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy))
|
||||
return None;
|
||||
|
||||
if (source_font == mask_font &&
|
||||
|
||||
if (source_font == mask_font &&
|
||||
_XcursorFontIsCursor (dpy, source_font) &&
|
||||
source_char + 1 == mask_char)
|
||||
{
|
||||
@ -131,14 +131,14 @@ XcursorNoticeCreateBitmap (Display *dpy,
|
||||
|
||||
if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy))
|
||||
return;
|
||||
|
||||
|
||||
if (width > MAX_BITMAP_CURSOR_SIZE || height > MAX_BITMAP_CURSOR_SIZE)
|
||||
return;
|
||||
|
||||
|
||||
info = _XcursorGetDisplayInfo (dpy);
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
|
||||
LockDisplay (dpy);
|
||||
replace = 0;
|
||||
now = dpy->request;
|
||||
@ -174,7 +174,7 @@ _XcursorGetBitmap (Display *dpy, Pixmap bitmap)
|
||||
|
||||
if (!dpy || !bitmap)
|
||||
return NULL;
|
||||
|
||||
|
||||
info = _XcursorGetDisplayInfo (dpy);
|
||||
|
||||
if (!info)
|
||||
@ -233,7 +233,7 @@ static unsigned char const _reverse_byte[0x100] = {
|
||||
0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
|
||||
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
|
||||
};
|
||||
|
||||
|
||||
#define RotByte(t,i) (((t) << (i)) | ((t) >> (8 - (i))))
|
||||
|
||||
void
|
||||
@ -273,7 +273,7 @@ XcursorImageHash (XImage *image,
|
||||
* Flip bit order on MSB images
|
||||
*/
|
||||
bit_swap = (image->bitmap_bit_order != LSBFirst);
|
||||
|
||||
|
||||
line = (unsigned char *) image->data;
|
||||
i = 0;
|
||||
/*
|
||||
@ -312,7 +312,7 @@ _XcursorLogDiscover (void)
|
||||
}
|
||||
return log;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XcursorNoticePutBitmap (Display *dpy,
|
||||
Drawable draw,
|
||||
@ -322,14 +322,14 @@ XcursorNoticePutBitmap (Display *dpy,
|
||||
|
||||
if (!dpy || !image)
|
||||
return;
|
||||
|
||||
|
||||
if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy))
|
||||
return;
|
||||
|
||||
if (image->width > MAX_BITMAP_CURSOR_SIZE ||
|
||||
|
||||
if (image->width > MAX_BITMAP_CURSOR_SIZE ||
|
||||
image->height > MAX_BITMAP_CURSOR_SIZE)
|
||||
return;
|
||||
|
||||
|
||||
bmi = _XcursorGetBitmap (dpy, (Pixmap) draw);
|
||||
if (!bmi)
|
||||
return;
|
||||
@ -374,7 +374,7 @@ XcursorNoticePutBitmap (Display *dpy,
|
||||
XImage t = *image;
|
||||
|
||||
XInitImage (&t);
|
||||
|
||||
|
||||
printf ("Cursor image name: ");
|
||||
for (i = 0; i < XCURSOR_BITMAP_HASH_SIZE; i++)
|
||||
printf ("%02x", bmi->hash[i]);
|
||||
@ -408,7 +408,7 @@ XcursorTryShapeBitmapCursor (Display *dpy,
|
||||
|
||||
if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy))
|
||||
return None;
|
||||
|
||||
|
||||
bmi = _XcursorGetBitmap (dpy, source);
|
||||
if (!bmi || !bmi->has_image)
|
||||
return None;
|
||||
|
Loading…
Reference in New Issue
Block a user