[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force Xcursor SVN commit: r48 - trunk



Author: branden
Date: 2004-04-19 12:14:00 -0500 (Mon, 19 Apr 2004)
New Revision: 48

Added:
   trunk/.cvsignore
   trunk/AUTHORS
   trunk/COPYING
   trunk/INSTALL
   trunk/Xcursor-def.cpp
   trunk/config-subst
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/Xcursor.h
   trunk/autogen.sh
   trunk/configure.ac
   trunk/cursor.c
   trunk/file.c
   trunk/library.c
   trunk/xcursorint.h
Log:
Merge Xcursor 1.1.3 onto the trunk.


Copied: trunk/.cvsignore (from rev 47, vendor/.cvsignore)

Copied: trunk/AUTHORS (from rev 47, vendor/AUTHORS)

Copied: trunk/COPYING (from rev 47, vendor/COPYING)

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/ChangeLog	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,3 +1,65 @@
+2004-04-13  Daniel Stone  <daniel@freedesktop.org>
+
+	* ChangeLog:
+	Tag 1.1.3, for xlibs 1.0.1.
+
+2004-04-07  Keith Packard  <keithp@keithp.com>
+
+	reviewed by: Michel Dänzer <michel@daenzer.net>
+	
+	* configure.ac:
+	Make sure X_CFLAGS/X_LIBS are substituted in the xcursor.pc file
+
+2004-02-24  Fredrik H�nd  <fredrik@kde.org>
+
+	* configure.ac:
+	* xcursorint.h:
+	Make the Xfixes code actually work by including the Xfixes.h
+	header file.
+
+2004-02-03  Jim Gettys  <jg@freedesktop.org>
+
+	* AUTHORS: Add contents to author's file
+
+2004-01-17  Daniel Stone  <daniel@fooishbar.org>
+	* Xcursor.h:
+	* configure.ac:
+	Bump package version to 1.1.2, slated for first fd.o platform release.
+
+2004-01-15  Harold L Hunt II <huntharo@msu.edu>
+	* Makefile.am: Pass -no-undefined to libtool via LDFLAGS.
+
+2003-11-10  Keith Packard  <keithp@keithp.com>
+
+	* library.c: (_XcursorBuildThemeDir):
+	Make sure the allocated path has space for directory separators
+
+2003-10-29  Keith Packard  <keithp@keithp.com>
+
+	* Xcursor.h:
+	* configure.ac:
+	Bump package version to 1.1.1 and library info to 1.2.0 as
+	the library exports new name-based APIs and uses Xfixes
+
+2003-10-28  Keith Packard  <keithp@keithp.com>
+
+	* Makefile.am:
+	* Xcursor.h:
+	* configure.ac:
+	* cursor.c: (XcursorImagesLoadCursor):
+	* file.c: (XcursorImagesCreate), (XcursorImagesDestroy),
+	(XcursorImagesSetName):
+	* library.c: (XcursorLibraryLoadImages),
+	(XcursorLibraryLoadCursor):
+	Add support for XFixes version 2 cursor naming functions
+
+2003-10-16 23:45 fredrik
+
+	* Xcursor-def.cpp, Xcursor.h, configure.ac, library.c:
+	Rename _XcursorLibraryPath() to XcursorLibraryPath() and make
+	it a public function, since it's useful for theme selectors.
+	Bump version to 1.1.0
+
 2003-05-21 10:21  keithp
 
 	* Makefile.am, Xcursor.h, configure.ac, xcursorint.h: Package

Copied: trunk/INSTALL (from rev 47, vendor/INSTALL)

Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/Makefile.am	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 # 
-#  $Id: Makefile.am,v 1.4 2003/05/21 17:21:36 keithp Exp $
+#  $Id: Makefile.am,v 1.6 2004/01/15 04:32:39 harold Exp $
 # 
 #  Copyright © 2003 Keith Packard, Noah Levitt
 # 
@@ -21,7 +21,7 @@
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-AM_CFLAGS = $(XRENDER_CFLAGS) $(X_CFLAGS) 
+AM_CFLAGS = $(XRENDER_CFLAGS) $(XFIXES_CFLAGS) $(X_CFLAGS)
 
 lib_LTLIBRARIES = libXcursor.la
 
@@ -29,12 +29,12 @@
 
 libXcursor_la_SOURCES = xcursorint.h cursor.c display.c file.c library.c xlib.c
 
-libXcursor_la_LIBADD = $(XRENDER_LIBS)
+libXcursor_la_LIBADD = $(XRENDER_LIBS) $(XFIXES_LIBS) $(X_LIBS)
 
 #
 # Shared library version info.  This is not the same as the package version
 #
-libXcursor_la_LDFLAGS = -version-info @LT_VERSION_INFO@
+libXcursor_la_LDFLAGS = -version-info @LT_VERSION_INFO@ -no-undefined
 
 libXcursorincludedir = $(includedir)/X11/Xcursor
 libXcursorinclude_HEADERS = Xcursor.h 

Copied: trunk/Xcursor-def.cpp (from rev 47, vendor/Xcursor-def.cpp)

Modified: trunk/Xcursor.h
===================================================================
--- trunk/Xcursor.h	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/Xcursor.h	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 /*
- * $Id: Xcursor.h,v 1.7 2003/05/21 17:21:36 keithp Exp $
+ * $Id: Xcursor.h,v 1.12 2004/04/12 14:11:12 daniel Exp $
  *
  * Copyright � 2002 Keith Packard
  *
@@ -76,8 +76,8 @@
  */
 
 #define XCURSOR_LIB_MAJOR	1
-#define XCURSOR_LIB_MINOR	0
-#define XCURSOR_LIB_REVISION	2
+#define XCURSOR_LIB_MINOR	1
+#define XCURSOR_LIB_REVISION	3
 #define XCURSOR_LIB_VERSION	((XCURSOR_LIB_MAJOR * 10000) + \
 				 (XCURSOR_LIB_MINOR * 100) + \
 				 (XCURSOR_LIB_REVISION))
@@ -197,6 +197,7 @@
 typedef struct _XcursorImages {
     int		    nimage;	/* number of images */
     XcursorImage    **images;	/* array of XcursorImage pointers */
+    char	    *name;	/* name used to load images */
 } XcursorImages;
 
 typedef struct _XcursorCursors {
@@ -247,6 +248,9 @@
 void
 XcursorImagesDestroy (XcursorImages *images);
 
+void
+XcursorImagesSetName (XcursorImages *images, const char *name);
+
 /*
  * Manage Cursor objects
  */
@@ -367,6 +371,10 @@
 /*
  * Library/shape API
  */
+
+const char *
+XcursorLibraryPath (void);
+
 int
 XcursorLibraryShape (const char *library);
     

Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/autogen.sh	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,61 +1,3 @@
 #! /bin/sh
-#
-# $Id: autogen.sh,v 1.1 2003/05/06 17:49:08 keithp Exp $
-#
-# runs autotools to create ./configure and friends
-#
-
-PROJECT=Xrender
-
-srcdir=`dirname "$0"`
-test -z $srcdir && srcdir=.
-
-origdir=`pwd`
-cd "$srcdir"
-
-if test -z "$AUTOGEN_SUBDIR_MODE" && test -z "$*"
-then
-  echo "I am going to run ./configure with no arguments - if you wish "
-  echo "to pass any to it, please specify them on the $0 command line."
-fi
-
-# Use the versioned executables if available.
-aclocal=aclocal-1.7
-automake=automake-1.7
-$aclocal  --version </dev/null >/dev/null 2>&1 || aclocal=aclocal
-$automake --version </dev/null >/dev/null 2>&1 || automake=automake
-
-# require libtool >= 1.5
-libtool_version=`libtool --version | head -1 | awk '{print $4}'`
-libtool_major=`echo $libtool_version | awk -F . '{print $1}'`
-libtool_minor=`echo $libtool_version | awk -F . '{print $2}'`
-if [ $libtool_major -lt 1 ] || [ $libtool_major -eq 1 -a $libtool_minor -lt 5 ]
-then
-    echo "libtool 1.5 or later is required. You have $libtool_version."
-    exit 1
-fi
-
-rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs
-rm -f config.cache acconfig.h
-rm -rf autom4te.cache
-
-set_option=':'
-test -n "${BASH_VERSION+set}" && set_option='set'
-
-$set_option -x
-
-$aclocal $ACLOCAL_FLAGS                  || exit 1
-libtoolize --force --copy                || exit 1
-autoheader                               || exit 1
-$automake --foreign --add-missing --copy || exit 1
-autoconf                                 || exit 1
-cd "$origdir"                            || exit 1
-
-if test -z "$AUTOGEN_SUBDIR_MODE"
-then
-  "$srcdir/configure" "$@" || exit 1
-  $set_option +x
-fi
-
-exit 0
-
+autoreconf -v --install || exit 1
+./configure --enable-maintainer-mode "$@"

Copied: trunk/config-subst (from rev 47, vendor/config-subst)

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/configure.ac	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 dnl 
-dnl  $Id: configure.ac,v 1.3 2003/05/21 17:21:36 keithp Exp $
+dnl  $Id: configure.ac,v 1.14 2004/04/12 14:11:12 daniel Exp $
 dnl 
 dnl  Copyright © 2003 Keith Packard
 dnl 
@@ -23,21 +23,24 @@
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.50])
-
-AC_INIT(Xcursor.h)
+AC_PREREQ([2.57])
 dnl
 dnl This is the package version number, not the shared library
 dnl version.  This same version number must appear in Xcursor.h
 dnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
 dnl not possible to extract the version number here from Xcursor.h
 dnl
-AM_INIT_AUTOMAKE(xcursor, 1.0.2)
+AC_INIT([libXcursor],1.1.3,[keithp@keithp.com],[libXcursor])
+AM_INIT_AUTOMAKE([dist-bzip2])
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_MAINTAINER_MODE
 AM_CONFIG_HEADER(config.h)
+AC_CONFIG_AUX_DIR(.)
 
 dnl libtool versioning
+
 LT_CURRENT=1
-LT_REVISION=1
+LT_REVISION=2
 LT_AGE=0
 
 AC_SUBST(LT_CURRENT)
@@ -54,9 +57,58 @@
 AC_PROG_CC
 AC_PROG_LIBTOOL
 
+
 # Debian-maintained Xcursor package sets AM_MAINTAINER_MODE
 AM_MAINTAINER_MODE
 
+# Check for X
+PKG_CHECK_MODULES(X, x11, 
+		  [x_found_with_pkgconfig=yes],
+		  [x_found_with_pkgconfig=no])
+		  
+if test "$x_found_with_pkgconfig" = "no"
+then
+	AC_PATH_XTRA
+	X_LIBS="$X_LIBS -lX11"
+
+	if test "x$no_x" = "xyes"
+	then
+	        AC_MSG_ERROR([X is required, but it was either disabled or not found.])
+	fi
+	# Check for XTHREADS
+	
+	save_LIBS="$LIBS"
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $X_CFLAGS"
+	LIBS="$LIBS $X_LIBS"
+	
+	AC_MSG_CHECKING([for XTHREADS in Xlib])
+	AC_RUN_IFELSE(
+		      [AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
+			[[return XInitThreads() == 0 ? 0 : 1;]])],
+			[xthreads=no],
+		[xthreads=yes],
+		[xthreads=yes])
+	
+	AC_MSG_RESULT($xthreads)
+	
+	LIBS="$save_LIBS"
+	CFLAGS="$save_CFLAGS"
+	
+	if test "x$xthreads" = "xyes"
+	then
+		X_CFLAGS="$X_CFLAGS -DXTHREADS"
+	fi
+
+	if test "x$no_x" = "xyes"
+	then
+	        AC_MSG_ERROR([X is required, but it was either disabled or not found.])
+	fi
+fi
+
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+
 PKG_CHECK_MODULES(XRENDER, xrender >= 0.8.2, [xrender_found_with_pkgconfig=yes], 
                   [xrender_found_with_pkgconfig=no])
 case "$xrender_found_with_pkgconfig" in
@@ -87,8 +139,10 @@
 	esac
         ;;
 esac
+PKG_CHECK_MODULES(XFIXES, xfixes, [AC_DEFINE_UNQUOTED(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])])
 
-AC_SUBST(RENDER_CFLAGS)
+AC_SUBST(XRENDER_LIBS)
+AC_SUBST(XRENDER_CFLAGS)
 
 AC_OUTPUT([Makefile
            xcursor.pc])

Modified: trunk/cursor.c
===================================================================
--- trunk/cursor.c	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/cursor.c	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 /*
- * $Id: cursor.c,v 1.6 2003/05/06 18:09:55 keithp Exp $
+ * $Id: cursor.c,v 1.7 2003/10/29 00:21:48 keithp Exp $
  *
  * Copyright � 2002 Keith Packard
  *
@@ -689,14 +689,14 @@
 Cursor
 XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images)
 {
+    Cursor  cursor;
     if (images->nimage == 1 || !XcursorSupportsAnim (dpy))
-	return XcursorImageLoadCursor (dpy, images->images[0]);
+	cursor = XcursorImageLoadCursor (dpy, images->images[0]);
     else
     {
 	XcursorCursors	*cursors = XcursorImagesLoadCursors (dpy, images);
 	XAnimCursor	*anim;
 	int		n;
-	Cursor		cursor;
 	
 	if (!cursors)
 	    return 0;
@@ -713,8 +713,12 @@
 	}
 	cursor = XRenderCreateAnimCursor (dpy, cursors->ncursor, anim);
 	free (anim);
-	return cursor;
     }
+#if XFIXES_MAJOR >= 2
+    if (images->name)
+	XFixesSetCursorName (dpy, cursor, images->name);
+#endif
+    return cursor;
 }
 
 

Modified: trunk/file.c
===================================================================
--- trunk/file.c	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/file.c	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.4 2003/05/06 18:09:55 keithp Exp $
+ * $Id: file.c,v 1.5 2003/10/29 00:21:48 keithp Exp $
  *
  * Copyright � 2002 Keith Packard
  *
@@ -61,6 +61,7 @@
 	return 0;
     images->nimage = 0;
     images->images = (XcursorImage **) (images + 1);
+    images->name = 0;
     return images;
 }
 
@@ -71,9 +72,24 @@
 
     for (n = 0; n < images->nimage; n++)
 	XcursorImageDestroy (images->images[n]);
+    if (images->name)
+	free (images->name);
     free (images);
 }
 
+void
+XcursorImagesSetName (XcursorImages *images, const char *name)
+{
+    char    *new = malloc (strlen (name) + 1);
+
+    if (!new)
+	return;
+    strcpy (new, name);
+    if (images->name)
+	free (images->name);
+    images->name = new;
+}
+
 XcursorComment *
 XcursorCommentCreate (XcursorUInt comment_type, int length)
 {

Modified: trunk/library.c
===================================================================
--- trunk/library.c	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/library.c	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 /*
- * $Id: library.c,v 1.3 2003/05/06 18:09:55 keithp Exp $
+ * $Id: library.c,v 1.6 2003/11/10 21:01:56 keithp Exp $
  *
  * Copyright � 2002 Keith Packard
  *
@@ -32,8 +32,8 @@
 
 #define CURSORPATH "~/.icons:/usr/share/icons:/usr/share/pixmaps:"ICONDIR
 
-static const char *
-_XcursorLibraryPath (void)
+const char *
+XcursorLibraryPath (void)
 {
     static const char	*path;
 
@@ -105,7 +105,11 @@
 	dirlen--;
     }
 
-    len = homelen + dirlen + 1 + themelen + 1;
+    /*
+     * add space for any needed directory separators, one per component,
+     * and one for the trailing null
+     */
+    len = 1 + homelen + 1 + dirlen + 1 + themelen + 1;
     
     full = malloc (len);
     if (!full)
@@ -215,7 +219,7 @@
     /*
      * Scan this theme
      */
-    for (path = _XcursorLibraryPath ();
+    for (path = XcursorLibraryPath ();
 	 path && f == 0;
 	 path = _XcursorNextPath (path))
     {
@@ -285,6 +289,8 @@
     if (f)
     {
 	images = XcursorFileLoadImages (f, size);
+	if (images)
+	    XcursorImagesSetName (images, file);
 	fclose (f);
     }
     return images;
@@ -309,6 +315,9 @@
     }
     cursor = XcursorImagesLoadCursor (dpy, images);
     XcursorImagesDestroy (images);
+#if XFIXES_MAJOR >= 2
+    XFixesSetCursorName (dpy, cursor, file);
+#endif
     return cursor;
 }
 

Modified: trunk/xcursorint.h
===================================================================
--- trunk/xcursorint.h	2004-04-19 17:03:58 UTC (rev 47)
+++ trunk/xcursorint.h	2004-04-19 17:14:00 UTC (rev 48)
@@ -1,5 +1,5 @@
 /*
- * $Id: xcursorint.h,v 1.6 2003/05/21 17:21:36 keithp Exp $
+ * $Id: xcursorint.h,v 1.8 2004/02/24 18:16:09 fredrik Exp $
  *
  * Copyright � 2002 Keith Packard
  *
@@ -25,9 +25,18 @@
 #ifndef _XCURSORINT_H_
 #define _XCURSORINT_H_
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+ 
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
 #include <X11/extensions/Xrender.h>
+
+#ifdef HAVE_XFIXES
+#include <X11/extensions/Xfixes.h>
+#endif
+
 #include "Xcursor.h"
 #include "config.h"
 



Reply to: