update to libXi 1.2.1

This commit is contained in:
matthieu 2009-05-02 15:23:04 +00:00
parent 443792d4c4
commit 0624b5db7f
22 changed files with 7202 additions and 4528 deletions

View File

@ -1,3 +1,124 @@
commit 69422ae36ede8fd5d7975c1e2b74c32906ad8535
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Feb 26 09:20:44 2009 +1000
libXi 1.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit f63ea39a328ce0e5e6c980243e2ebea15634dc7d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Feb 25 17:00:16 2009 +1000
XGetDeviceControl: size the libXi structs, not the wire structs (#20293)
X.Org Bug 20293 <http://bugs.freedesktop.org/show_bug.cgi?id=20293>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit cbdc33d903ec6f90a42ec3c31905eeaef9ecf0a2)
commit 6e65cf0776019b2eec6be4a06fef7838562e94a8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Feb 25 16:59:04 2009 +1000
XGetDeviceControl: Add a missing break leading to wrong length calculation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 78f64722c57ff5ec5d0ae35da0c8f151598e6d6b)
commit 17df06d5aeceb4798caf487a1d57efe58fa7e3fa
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Feb 2 20:34:34 2009 -0800
Add README with pointers to mailing list, bugzilla & git repos
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit 6e1159a9059d762d6b5d24455237a088e839fe2c)
commit f2f92b1df861c1f571edc89eddbb8d72a228e2a8
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Thu Jan 29 19:30:30 2009 -0200
Return NULL on error, and match LockDisplay with UnlockDisplay.
(cherry picked from commit ba2546a51d5f9087ec54fba7cae46ea1f210198a)
commit 2d586065649304b2864afddee6f6225a4a61a0c9
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Wed Dec 3 12:50:45 2008 +1000
libXi 1.2.0
Requires inputproto 1.5.0 or later.
commit 305d356e43462834a2fdd2cf59d47b055c2416fd
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Mon Nov 17 11:50:06 2008 +1000
Add support for XI 1.5 device properties.
This is a manual merge from master onto libXi 1.1.4. The branches have
diverged too much to make cherry-picking reasonable and readable.
This patch includes the property support provided by the combination of the
following patches:
- 7d5bb99ffce3200f82420c5a5ebac3b445aac633
- 0211e3e8277c590349903989f1676f6af4baa44b
- bfd2e08f3530091fbcd8c078f684e9aab9057df0
- bec02767629ed795582ba3f645299d7036093511
- f9a5371d43b2c6023745f766d0e8ceff2acdff60
- e179b124aac13387c6f730197b8852c1f69eb9e3
Man pages are copied from the parsed docbook output from master.
commit 45b73dc157f326785e1022f5476bfc1f9f514d6e
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Mon Nov 17 11:44:31 2008 +1000
Add XI_JOYSTICK to list of defined types.
(cherry picked from commit e5c529813b04327babc20e51ca56006210cb0c37)
Conflicts:
man/XI.xml
commit 88e2bf75cc619bb1ddc51e5dc65ddb9d712f69f5
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Mon Nov 17 11:35:59 2008 +1000
Bump to 1.1.99.2.
1.1.99.1 was used by master for a while.
commit f0ecfd1952289f5ff33297e3358552365e047f09
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Mon Nov 17 11:12:39 2008 +1000
libXi 1.1.4
commit 3e99cc281509c70c9240e71ae55cf4e62c6569ba
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Sun Mar 9 08:30:32 2008 +0100
nuke RCS Ids
commit 411340ccb7070e2e966a36f64f2fb3019ea0242a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Nov 29 13:49:21 2007 -0800
Coverity #743/744: Returned without freeing storage bufp/savp
If either bufp or savp failed to malloc, we returned without freeing the other.
commit 5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date: Tue Nov 27 10:47:56 2007 +1030
GetDeviceControl: calculate the length field correctly.
Length field should indicate the length of the struct in bytes. Not the length
of the pointer to the struct...
(cherry picked from commit ddcc71df2a273a410cb5a933aef5501fa56d84cf)
commit 0239ef13d66113024066b7db8ade3942af563656
Author: Eric Anholt <eric@anholt.net>
Date: Wed Sep 5 09:45:20 2007 -0700

View File

@ -1,5 +1,5 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.2 2007/03/15 23:00:47 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2009/05/02 15:23:04 matthieu Exp $
SHARED_LIBS= Xi 10.0
SHARED_LIBS= Xi 10.1
.include <bsd.xorg.mk>

View File

@ -110,6 +110,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@ -120,6 +121,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -139,6 +141,7 @@ MAKEINFO = @MAKEINFO@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -149,6 +152,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@ -157,13 +161,9 @@ XI_CFLAGS = @XI_CFLAGS@
XI_LIBS = @XI_LIBS@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
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@
@ -180,23 +180,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@ -0,0 +1,25 @@
libXi - library for the X Input Extension
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/lib/libXi
http://cgit.freedesktop.org/xorg/lib/libXi
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

782
lib/libXi/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

9685
lib/libXi/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(libXi, 1.1.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
AC_INIT(libXi, 1.2.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
@ -15,7 +15,7 @@ AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for pkg-config packages
PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto >= 1.4)
PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto >= 1.5)
AC_SUBST(XI_CFLAGS)
AC_SUBST(XI_LIBS)

View File

@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
# 2007, 2008 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.22
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
VERSION=1.5.26
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@ -105,11 +113,19 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
if test "${LC_ALL+set}" = set; then
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
fi
if test "${LANG+set}" = set; then
save_LANG="$LANG"; LANG=C; export LANG
lt_env=
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${$lt_var+set}\" = set; then
save_$lt_var=\$$lt_var
lt_env=\"$lt_var=\$$lt_var \$lt_env\"
$lt_var=C
export $lt_var
fi"
done
if test -n "$lt_env"; then
lt_env="env $lt_env"
fi
# Make sure IFS has a sensible default
@ -136,6 +152,8 @@ duplicate_deps=no
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0
#####################################
# Shell function definitions:
@ -196,7 +214,13 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
$SED -n -e '1,100{
/ I /{
s,.*,import,
p
q
}
}'`
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
@ -327,7 +351,17 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xdir="$my_gentop/$my_xlib"
my_xlib_u=$my_xlib
while :; do
case " $extracted_archives " in
*" $my_xlib_u "*)
extracted_serial=`expr $extracted_serial + 1`
my_xlib_u=lt$extracted_serial-$my_xlib ;;
*) break ;;
esac
done
extracted_archives="$extracted_archives $my_xlib_u"
my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@ -454,11 +488,12 @@ do
;;
--version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
echo "\
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
@ -755,9 +790,11 @@ if test -z "$show_help"; then
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
*.f90) xform=f90 ;;
*.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
*.obj) xform=obj ;;
*.sx) xform=sx ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@ -926,7 +963,7 @@ EOF
$run $rm "$lobj" "$output_obj"
$show "$command"
if $run eval "$command"; then :
if $run eval $lt_env "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
exit $EXIT_FAILURE
@ -998,7 +1035,7 @@ EOF
command="$command$suppress_output"
$run $rm "$obj" "$output_obj"
$show "$command"
if $run eval "$command"; then :
if $run eval $lt_env "$command"; then :
else
$run $rm $removelist
exit $EXIT_FAILURE
@ -1131,6 +1168,7 @@ EOF
thread_safe=no
vinfo=
vinfo_number=no
single_module="${wl}-single_module"
func_infer_tag $base_compile
@ -1138,8 +1176,9 @@ EOF
for arg
do
case $arg in
-all-static | -static)
if test "X$arg" = "X-all-static"; then
-all-static | -static | -static-libtool-libs)
case $arg in
-all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@ -1147,12 +1186,20 @@ EOF
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
else
;;
-static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
fi
;;
-static-libtool-libs)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
;;
esac
build_libtool_libs=no
build_old_libs=yes
break
@ -1600,7 +1647,7 @@ EOF
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@ -1608,6 +1655,11 @@ EOF
continue
;;
-multi_module)
single_module="${wl}-multi_module"
continue
;;
-module)
module=yes
continue
@ -1621,10 +1673,11 @@ EOF
# -m* pass through architecture-specific compiler args for GCC
# -m*, -t[45]*, -txscale* pass through architecture-specific
# compiler args for GCC
# -pg pass through profiling flag for GCC
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
# -F/path gives path to uninstalled frameworks, gcc on darwin
# @file GCC response files
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-t[45]*|-txscale*|@*)
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
@ -1652,9 +1705,9 @@ EOF
-no-install)
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
# in order for the loader to find any dlls it needs.
# and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
@ -1713,7 +1766,7 @@ EOF
continue
;;
-static)
-static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@ -2074,17 +2127,6 @@ EOF
;;
esac
for pass in $passes; do
# The preopen pass in lib mode reverses $deplibs; put it back here
# so that -L comes before libs that need it for instance...
if test "$linkmode,$pass" = "lib,link"; then
## FIXME: Find the place where the list is rebuilt in the wrong
## order, and fix it there properly
tmp_deplibs=
for deplib in $deplibs; do
tmp_deplibs="$deplib $tmp_deplibs"
done
deplibs="$tmp_deplibs"
fi
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"
@ -2106,7 +2148,7 @@ EOF
lib=
found=no
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@ -2122,7 +2164,12 @@ EOF
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
if test "$linkmode" = lib; then
searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
else
searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
fi
for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
@ -2503,7 +2550,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
{ { test "$prefer_static_libs" = no ||
test "$prefer_static_libs,$installed" = "built,yes"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@ -2916,12 +2965,18 @@ EOF
# we do not want to link against static libs,
# but need to link against shared
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
if test -f "$path/$depdepl" ; then
if test -f "$deplibdir/$depdepl" ; then
depdepl="$deplibdir/$depdepl"
elif test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl"
else
# Can't find it, oh well...
depdepl=
fi
# do not add paths which are already there
case " $newlib_search_path " in
@ -3069,9 +3124,10 @@ EOF
case $linkmode in
oldlib)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
fi
case " $deplibs" in
*\ -l* | *\ -L*)
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
@ -3199,7 +3255,7 @@ EOF
# which has an extra 1 added just for fun
#
case $version_type in
darwin|linux|osf|windows)
darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@ -3210,9 +3266,10 @@ EOF
age="0"
;;
irix|nonstopux)
current=`expr $number_major + $number_minor - 1`
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
lt_irix_increment=no
;;
esac
;;
@ -3271,7 +3328,8 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@ -3285,8 +3343,11 @@ EOF
;;
irix | nonstopux)
major=`expr $current - $age + 1`
if test "X$lt_irix_increment" = "Xno"; then
major=`expr $current - $age`
else
major=`expr $current - $age + 1`
fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@ -3437,11 +3498,11 @@ EOF
fi
# Eliminate all temporary directories.
for path in $notinst_path; do
lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
done
#for path in $notinst_path; do
# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
#done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@ -3542,13 +3603,12 @@ EOF
int main() { return 0; }
EOF
$rm conftest
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" -ne "0"; then
if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@ -3587,9 +3647,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
$LTCC $LTCFLAGS -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@ -3621,7 +3679,7 @@ EOF
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
$echo "*** make it link in! You will probably need to install it or some"
$echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@ -3907,7 +3965,10 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
case $archive_cmds in
*\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
*) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@ -4217,9 +4278,10 @@ EOF
;;
obj)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
fi
case " $deplibs" in
*\ -l* | *\ -L*)
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
@ -4266,12 +4328,14 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec
# -Wl from whole_archive_flag_spec and hope we can get by with
# turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@ -4719,16 +4783,16 @@ static const void *lt_preloaded_setup() {
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
@ -4743,13 +4807,13 @@ static const void *lt_preloaded_setup() {
# really was required.
# Nullify the symbol file.
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@ -4836,7 +4900,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@ -4873,7 +4937,7 @@ static const void *lt_preloaded_setup() {
fi
done
relink_command="(cd `pwd`; $relink_command)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@ -5280,6 +5344,20 @@ EOF
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@ -5422,7 +5500,7 @@ else
;;
esac
$echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
\$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@ -5608,7 +5686,7 @@ fi\
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@ -5957,9 +6035,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@ -6168,7 +6246,7 @@ relink_command=\"$relink_command\""
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@ -6345,8 +6423,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit $EXIT_FAILURE
if test ! -f "$dir/$dlname"; then
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit $EXIT_FAILURE
fi
fi
;;
@ -6410,12 +6490,12 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
if test "${save_LC_ALL+set}" = set; then
LC_ALL="$save_LC_ALL"; export LC_ALL
fi
if test "${save_LANG+set}" = set; then
LANG="$save_LANG"; export LANG
fi
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${save_$lt_var+set}\" = set; then
$lt_var=\$save_$lt_var; export $lt_var
fi"
done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@ -6772,9 +6852,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
try to export only the symbols listed in SYMFILE
try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
try to export only the symbols matching REGEX
try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@ -6788,9 +6868,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of libtool libraries
-static do not do any dynamic linking of uninstalled libtool libraries
-static-libtool-libs
do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
specify library version info [each variable defaults to 0]
specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.

View File

@ -1,4 +1,3 @@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
@ -51,7 +50,9 @@ libman_PRE = \
XSetDeviceButtonMapping.man \
XSetDeviceFocus.man \
XSetDeviceMode.man \
XSetDeviceValuators.man
XSetDeviceValuators.man \
XListDeviceProperties.man \
XGetDeviceProperty.man
BUILT_SOURCES = shadows.DONE
@ -89,7 +90,8 @@ all_shadows = \
$(XOpenDevice_shadows) \
$(XSetDeviceButtonMapping_shadows) \
$(XSetDeviceFocus_shadows) \
$(XSelectExtensionEvent_shadows)
$(XSelectExtensionEvent_shadows) \
$(XGetDeviceProperty_shadows)
XGetDeviceControl_shadows = \
@ -134,6 +136,10 @@ XSetDeviceFocus_shadows = \
XSelectExtensionEvent_shadows = \
XGetSelectedExtensionEvents
XGetDeviceProperty_shadows = \
XDeleteDeviceProperty \
XChangeDeviceProperty
shadows.DONE:
-rm -f $(all_shadows:=.@LIB_MAN_SUFFIX@)
(for i in $(XGetDeviceControl_shadows:=.@LIB_MAN_SUFFIX@) ; do \
@ -178,3 +184,6 @@ shadows.DONE:
(for i in $(XSelectExtensionEvent_shadows:=.@LIB_MAN_SUFFIX@) ; do \
echo .so man$(LIB_MAN_DIR_SUFFIX)/XSelectExtensionEvent.$(LIB_MAN_SUFFIX) > $$i; \
done)
(for i in $(XGetDeviceProperty_shadows:=.@LIB_MAN_SUFFIX@) ; do \
echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceProperty.$(LIB_MAN_SUFFIX) > $$i; \
done)

View File

@ -14,7 +14,6 @@
@SET_MAKE@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
@ -110,6 +109,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@ -120,6 +120,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -139,6 +140,7 @@ MAKEINFO = @MAKEINFO@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -149,6 +151,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = sed
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@ -157,13 +160,9 @@ XI_CFLAGS = @XI_CFLAGS@
XI_LIBS = @XI_LIBS@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
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@
@ -180,23 +179,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@ -226,7 +232,9 @@ libman_PRE = \
XSetDeviceButtonMapping.man \
XSetDeviceFocus.man \
XSetDeviceMode.man \
XSetDeviceValuators.man
XSetDeviceValuators.man \
XListDeviceProperties.man \
XGetDeviceProperty.man
BUILT_SOURCES = shadows.DONE
EXTRA_DIST = $(libman_PRE)
@ -234,7 +242,6 @@ CLEANFILES = $(libman_DATA) $(BUILT_SOURCES)
libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
$(all_shadows:=.@LIB_MAN_SUFFIX@)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
@ -256,7 +263,8 @@ all_shadows = \
$(XOpenDevice_shadows) \
$(XSetDeviceButtonMapping_shadows) \
$(XSetDeviceFocus_shadows) \
$(XSelectExtensionEvent_shadows)
$(XSelectExtensionEvent_shadows) \
$(XGetDeviceProperty_shadows)
XGetDeviceControl_shadows = \
XChangeDeviceControl
@ -300,6 +308,10 @@ XSetDeviceFocus_shadows = \
XSelectExtensionEvent_shadows = \
XGetSelectedExtensionEvents
XGetDeviceProperty_shadows = \
XDeleteDeviceProperty \
XChangeDeviceProperty
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -534,6 +546,9 @@ shadows.DONE:
(for i in $(XSelectExtensionEvent_shadows:=.@LIB_MAN_SUFFIX@) ; do \
echo .so man$(LIB_MAN_DIR_SUFFIX)/XSelectExtensionEvent.$(LIB_MAN_SUFFIX) > $$i; \
done)
(for i in $(XGetDeviceProperty_shadows:=.@LIB_MAN_SUFFIX@) ; do \
echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceProperty.$(LIB_MAN_SUFFIX) > $$i; \
done)
# 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:

View File

@ -0,0 +1,191 @@
.\" Title: XGetDeviceProperty
.\" Author: Peter Hutterer
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: <pubdate>July 9, 2008</pubdate>
.\" Manual: XINPUT FUNCTIONS
.\" Source: __xorgversion__
.\"
.TH "XGETDEVICEPROPERTY" "__libmansuffix__" "<pubdate>July 9, 2008</pubdate>" "__xorgversion__" "XINPUT FUNCTIONS"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty - Get, change or delete a device's property.
.SH "SYNTAX"
.sp
.ft B
.nf
#include <X11/extensions/XInput\.h>
.fi
.ft
.HP 23
.BI "int XGetDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", long\ " "offset" ", long\ " "length" ", Bool\ " "delete" ", Bool\ " "pending" ", Atom\ " "req_type" ", Atom\ *" "actual_type_return" ", int\ *" "actual_format_return" ", unsigned\ long\ *" "nitems_return" ", unsigned\ long\ *" "bytes_after_return" ", unsigned\ char\ **" "prop_return" ");"
.HP 27
.BI "void XChangeDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", Atom\ " "type" ", int\ " "format" ", int\ " "mode" ", const\ char\ *" "data" ", int\ " "nelements" ");"
.HP 27
.BI "void XDeleteDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ");"
.SH "ARGUMENTS"
.PP
.PP
\fIactual_type_return\fR
.RS 4
Returns an atom identifier that defines the actual type of the property\.
.RE
.PP
\fIactual_format_return\fR
.RS 4
Returns the actual format of the property\.
.RE
.PP
\fIbytes_after_return\fR
.RS 4
Returns the number of bytes remaining to be read in the property if a partial read was performed\.
.RE
.PP
\fIdata\fR
.RS 4
Specifies the property data\.
.RE
.PP
\fIdelete\fR
.RS 4
Specifies a Boolean value that determines wether the property is deleted\.
.RE
.PP
\fIdisplay\fR
.RS 4
Specifies the connection to the X server\.
.RE
.PP
\fIdevice\fR
.RS 4
The device to grab\.
.RE
.PP
\fIformat\fR
.RS 4
Specifies whether the data should be viewed as a list of 8\-bit, 16\-bit, or 32\-bit quantities\. Possible values are 8, 16, and 32\. This information allows the X server to correctly perform byte\-swap operations as necessary\. If the format is 16\-bit or 32\-bit, you must explicitly cast the data pointer to an (unsigned char*) in the call to
\fBXChangeDeviceProperty\fR\.
.RE
.PP
\fIlength\fR
.RS 4
Specifies the length in 32\-bit multiplies of the data to be retrieved\.
.RE
.PP
\fImode\fR
.RS 4
Specifies the mode of operation\. You can pass
\fBPropModeReplace\fR,
\fBPropModePrepend\fR, or
\fBPropModeAppend\fR\.
.RE
.PP
\fInelements\fR
.RS 4
Specifies the number of elements in data\.
.RE
.PP
\fInitems_return\fR
.RS 4
Returns the actual number of 8\-bit, 16\-bit, or 32\-bit items stored in the prop_return array\.
.RE
.PP
\fInum_values\fR
.RS 4
Specifies the number of elements in the values list\.
.RE
.PP
\fIoffset\fR
.RS 4
Specifies the offset in the specified property (in 32\-bit quantities) where the data is to be retrieved\.
.RE
.PP
\fIpending\fR
.RS 4
Specifies whether to retrieve the pending state of the property or the current state\.
.RE
.PP
\fIproperty\fR
.RS 4
Specifies the property to modify or query\.
.RE
.PP
\fIprop_return\fR
.RS 4
Returns the data in the specified format\. If the returned format is 8, the returned data is represented as a char array\. If the returned format is 16, the returned data is represented as an array of short int type and should be cast to that type to obtain the elements\. If the returned format is 32, the property data will be stored as an array of longs (which in a 64\-bit application will be 64\-bit values that are padded in the upper 4 bytes)\.
.RE
.PP
\fIreq_type\fR
.RS 4
Specifies the atom identifier associated with the property type or
\fBAnyPropertyType\fR\.
.RE
.SH "DESCRIPTION"
.PP
The
\fBXGetDeviceProperty\fR
function returns the actual type of the property; the actual format of the property; the number of 8\-bit, 16\-bit, or 32\-bit items transferred; the number of bytes remaining to be read in the property; and a pointer to the data actually returned\. For a detailed description of this function, see the man page to
\fBXGetWindowProperty\fR\.
.PP
The
\fBXChangeDeviceProperty\fR
function alters the property for the specified device and causes the server to generate a
\fBXPropertyNotifyEvent\fR
event on that device\. For a detailed description of this function, see the man page to
\fBXChangeProperty\fR\.
.PP
The
\fBXDeleteDeviceProperty\fR
function deletes the specified device property\. Note that a client cannot delete a property created by a driver or the server\. Attempting to do so will result in a
BadAtom
error\.
.PP
\fBXGetDeviceProperty\fR
can generate a
BadAtom,
BadDevice
error\.
.PP
\fBXChangeDeviceProperty\fR
can generate a
BadDevice, a
BadMatch, a
BadAtom, and a
BadValue
error\.
.PP
\fBXDeleteDeviceProperty\fR
can generate a
BadDevice, and a
BadAtom
error\.
.SH "DIAGNOSIS"
.PP
.PP
BadAtom
.RS 4
A value does not describe a valid named identifier or the client attempted to remove a driver\-allocated property\.
.RE
.PP
BadDevice
.RS 4
An invalid device was specified\. The device does not exist\.
.RE
.SH "SEE ALSO"
.PP
\fBXListDeviceProperties\fR,
\fBXQueryDeviceProperty\fR,
\fBXConfigureDeviceProperty\fR\.
.SH "AUTHOR"
.PP
\fBPeter Hutterer\fR
.sp -1n
.IP "" 4
Specification and implementation\.

View File

@ -0,0 +1,95 @@
.\" Title: XListDeviceProperties
.\" Author: Peter Hutterer
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: <pubdate>July 9, 2008</pubdate>
.\" Manual: XINPUT FUNCTIONS
.\" Source: __xorgversion__
.\"
.TH "XLISTDEVICEPROPERTIE" "__libmansuffix__" "<pubdate>July 9, 2008</pubdate>" "__xorgversion__" "XINPUT FUNCTIONS"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
XListDeviceProperties - List a device's properties.
.SH "SYNTAX"
.sp
.ft B
.nf
#include <X11/extensions/XInput\.h>
.fi
.ft
.HP 28
.BI "Atom* XListDeviceProperties(Display\ *" "display" ", XDevice\ *" "device" ", int\ *" "nprops_return" ");"
.SH "ARGUMENTS"
.PP
.PP
\fIdisplay\fR
.RS 4
Specifies the connection to the X server\.
.RE
.PP
\fIdevice\fR
.RS 4
The device to grab\.
.RE
.PP
\fInprops_return\fR
.RS 4
Specifies the number of Atoms returned\.
.RE
.PP
\fInum_values\fR
.RS 4
Specifies the number of elements in the values list\.
.RE
.PP
\fIproperty\fR
.RS 4
Specifies the property to modify or query\.
.RE
.SH "DESCRIPTION"
.PP
The
\fBXListDeviceProperties\fR
function returns a list of the properties associated with the input device specified in
\fIdevice\fR\. Each device may have an arbitrary number of properties attached, some of which were created by the driver and/or server, others created by clients at runtime\.
.PP
The client is expected to free the list of properties using
\fBXFree\fR\.
.PP
\fBXListDeviceProperties\fR
can generate a
BadDevice
error\.
.SH "DIAGNOSIS"
.PP
.PP
BadAtom
.RS 4
A value does not describe a valid named identifier\.
.RE
.PP
BadWindow
.RS 4
A value for a Window argument does not name a defined window\.
.RE
.PP
BadDevice
.RS 4
An invalid device was specified\. The device does not exist\.
.RE
.SH "SEE ALSO"
.PP
\fBXChangeDeviceProperty\fR,
\fBXGetDeviceProperty\fR,
\fBXDeleteDeviceProperty\fR\.
.SH "AUTHOR"
.PP
\fBPeter Hutterer\fR
.sp -1n
.IP "" 4
Specification and implementation\.

View File

@ -97,6 +97,7 @@ XI_DATAGLOVE
XI_EYETRACKER
XI_CURSORKEYS
XI_FOOTMOUSE
XI_JOYSTICK
.DE
.LP
These names may be directly compared with the name field of the

View File

@ -6,15 +6,18 @@ libXi_la_SOURCES = \
XAllowDv.c \
XChgDCtl.c \
XChgFCtl.c \
XChDProp.c \
XChgKbd.c \
XChgKMap.c \
XChgPnt.c \
XChgProp.c \
XCloseDev.c \
XDelDProp.c \
XDevBell.c \
XExtToWire.c \
XGetBMap.c \
XGetDCtl.c \
XGetDProp.c \
XGetFCtl.c \
XGetKMap.c \
XGetMMap.c \
@ -27,6 +30,7 @@ libXi_la_SOURCES = \
XGtFocus.c \
XGtSelect.c \
XListDev.c \
XListDProp.c \
XOpenDev.c \
XQueryDv.c \
XSelect.c \

View File

@ -59,14 +59,15 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libXi_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libXi_la_OBJECTS = XAllowDv.lo XChgDCtl.lo XChgFCtl.lo XChgKbd.lo \
XChgKMap.lo XChgPnt.lo XChgProp.lo XCloseDev.lo XDevBell.lo \
XExtToWire.lo XGetBMap.lo XGetDCtl.lo XGetFCtl.lo XGetKMap.lo \
XGetMMap.lo XGetProp.lo XGetVers.lo XGMotion.lo XGrabDev.lo \
XGrDvBut.lo XGrDvKey.lo XGtFocus.lo XGtSelect.lo XListDev.lo \
XOpenDev.lo XQueryDv.lo XSelect.lo XSetBMap.lo XSetDVal.lo \
XSetMMap.lo XSetMode.lo XSndExEv.lo XStFocus.lo XUngrDev.lo \
XUngrDvB.lo XUngrDvK.lo XExtInt.lo
am_libXi_la_OBJECTS = XAllowDv.lo XChgDCtl.lo XChgFCtl.lo XChDProp.lo \
XChgKbd.lo XChgKMap.lo XChgPnt.lo XChgProp.lo XCloseDev.lo \
XDelDProp.lo XDevBell.lo XExtToWire.lo XGetBMap.lo XGetDCtl.lo \
XGetDProp.lo XGetFCtl.lo XGetKMap.lo XGetMMap.lo XGetProp.lo \
XGetVers.lo XGMotion.lo XGrabDev.lo XGrDvBut.lo XGrDvKey.lo \
XGtFocus.lo XGtSelect.lo XListDev.lo XListDProp.lo XOpenDev.lo \
XQueryDv.lo XSelect.lo XSetBMap.lo XSetDVal.lo XSetMMap.lo \
XSetMode.lo XSndExEv.lo XStFocus.lo XUngrDev.lo XUngrDvB.lo \
XUngrDvK.lo XExtInt.lo
libXi_la_OBJECTS = $(am_libXi_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
@ -111,6 +112,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@ -121,6 +123,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -140,6 +143,7 @@ MAKEINFO = @MAKEINFO@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -150,6 +154,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@ -158,13 +163,9 @@ XI_CFLAGS = @XI_CFLAGS@
XI_LIBS = @XI_LIBS@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
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@
@ -181,23 +182,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@ -207,15 +215,18 @@ libXi_la_SOURCES = \
XAllowDv.c \
XChgDCtl.c \
XChgFCtl.c \
XChDProp.c \
XChgKbd.c \
XChgKMap.c \
XChgPnt.c \
XChgProp.c \
XCloseDev.c \
XDelDProp.c \
XDevBell.c \
XExtToWire.c \
XGetBMap.c \
XGetDCtl.c \
XGetDProp.c \
XGetFCtl.c \
XGetKMap.c \
XGetMMap.c \
@ -228,6 +239,7 @@ libXi_la_SOURCES = \
XGtFocus.c \
XGtSelect.c \
XListDev.c \
XListDProp.c \
XOpenDev.c \
XQueryDv.c \
XSelect.c \
@ -340,6 +352,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XAllowDv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChDProp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChgDCtl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChgFCtl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChgKMap.Plo@am__quote@
@ -347,12 +360,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChgPnt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XChgProp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XCloseDev.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDelDProp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDevBell.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XExtInt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XExtToWire.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGMotion.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetBMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetDCtl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetDProp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetFCtl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetKMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGetMMap.Plo@am__quote@
@ -363,6 +378,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGrabDev.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGtFocus.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGtSelect.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XListDProp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XListDev.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XOpenDev.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XQueryDv.Plo@am__quote@

106
lib/libXi/src/XChDProp.c Normal file
View File

@ -0,0 +1,106 @@
/************************************************************
Copyright 2008 Peter Hutterer
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.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the author shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the author.
*/
/***********************************************************************
* XChangeDeviceProperties - change an input device's properties.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/Xlibint.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include "XIint.h"
void
XChangeDeviceProperty(Display* dpy, XDevice* dev,
Atom property, Atom type,
int format, int mode,
_Xconst unsigned char *data, int nelements)
{
xChangeDevicePropertyReq *req;
int len;
XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
return;
GetReq(ChangeDeviceProperty, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_ChangeDeviceProperty;
req->deviceid = dev->device_id;
req->property = property;
req->type = type;
req->mode = mode;
if (nelements < 0) {
req->nUnits = 0;
req->format = 0; /* ask for garbage, get garbage */
} else {
req->nUnits = nelements;
req->format = format;
}
switch (req->format) {
case 8:
len = ((long)nelements + 3) >> 2;
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
Data (dpy, (char *)data, nelements);
} /* else force BadLength */
break;
case 16:
len = ((long)nelements + 1) >> 1;
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
len = (long)nelements << 1;
Data16 (dpy, (short *) data, len);
} /* else force BadLength */
break;
case 32:
len = nelements;
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
len = (long)nelements << 2;
Data32 (dpy, (long *) data, len);
} /* else force BadLength */
break;
default:
/* BadValue will be generated */ ;
}
UnlockDisplay(dpy);
SyncHandle();
}

64
lib/libXi/src/XDelDProp.c Normal file
View File

@ -0,0 +1,64 @@
/************************************************************
Copyright 2008 Peter Hutterer
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.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the author shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the author.
*/
/***********************************************************************
* XDeleteDeviceProperties - delete an input device's properties.
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/Xlibint.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include "XIint.h"
void
XDeleteDeviceProperty(Display* dpy, XDevice* dev, Atom property)
{
xDeleteDevicePropertyReq *req;
XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
return;
GetReq(DeleteDeviceProperty, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_DeleteDeviceProperty;
req->deviceid = dev->device_id;
req->property = property;
UnlockDisplay(dpy);
SyncHandle();
return;
}

View File

@ -121,7 +121,9 @@ XEXT_GENERATE_FIND_DISPLAY(XInput_find_display, xinput_info,
{XI_Present, XI_Add_XChangeDeviceControl_Major,
XI_Add_XChangeDeviceControl_Minor},
{XI_Present, XI_Add_DevicePresenceNotify_Major,
XI_Add_DevicePresenceNotify_Minor}
XI_Add_DevicePresenceNotify_Minor},
{XI_Present, XI_Add_DeviceProperties_Major,
XI_Add_DeviceProperties_Minor},
};
/***********************************************************************
@ -697,6 +699,21 @@ XInputWireToEvent(dpy, re, event)
}
break;
case XI_DevicePropertyNotify:
{
XDevicePropertyNotifyEvent* ev = (XDevicePropertyNotifyEvent*)re;
devicePropertyNotify *ev2 = (devicePropertyNotify*)event;
*ev = *(XDevicePropertyNotifyEvent*)save;
ev->time = ev2->time;
ev->deviceid = ev2->deviceid;
ev->atom = ev2->atom;
ev->state = ev2->state;
return ENQUEUE_EVENT;
}
break;
default:
printf("XInputWireToEvent: UNKNOWN WIRE EVENT! type=%d\n", type);
break;

View File

@ -115,6 +115,8 @@ Time stop;
savp = readp = (int *)Xmalloc(size);
bufp = (int *)Xmalloc(size2);
if (!bufp || !savp) {
Xfree(bufp);
Xfree(savp);
*nEvents = 0;
_XEatData(dpy, (unsigned long)size);
UnlockDisplay(dpy);

View File

@ -104,6 +104,12 @@ XGetDeviceControl(dpy, dev, control)
sav = d;
_XRead(dpy, (char *)d, nbytes);
/* In theory, we should just be able to use d->length to get the size.
* Turns out that a number of X servers (up to and including server
* 1.4) sent the wrong length value down the wire. So to not break
* apps that run against older servers, we have to calculate the size
* manually.
*/
switch (d->control) {
case DEVICE_RESOLUTION:
{
@ -116,17 +122,18 @@ XGetDeviceControl(dpy, dev, control)
}
case DEVICE_ABS_CALIB:
{
size += sizeof(xDeviceAbsCalibState);
size += sizeof(XDeviceAbsCalibState);
break;
}
case DEVICE_ABS_AREA:
{
size += sizeof(xDeviceAbsAreaState);
size += sizeof(XDeviceAbsAreaState);
break;
}
case DEVICE_CORE:
{
size += sizeof(xDeviceCoreState);
size += sizeof(XDeviceCoreState);
break;
}
default:
size += d->length;
@ -170,7 +177,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceAbsCalibState *C = (XDeviceAbsCalibState *) Device;
C->control = DEVICE_ABS_CALIB;
C->length = sizeof(C);
C->length = sizeof(XDeviceAbsCalibState);
C->min_x = c->min_x;
C->max_x = c->max_x;
C->min_y = c->min_y;
@ -188,7 +195,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceAbsAreaState *A = (XDeviceAbsAreaState *) Device;
A->control = DEVICE_ABS_AREA;
A->length = sizeof(A);
A->length = sizeof(XDeviceAbsAreaState);
A->offset_x = a->offset_x;
A->offset_y = a->offset_y;
A->width = a->width;
@ -204,7 +211,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceCoreState *C = (XDeviceCoreState *) Device;
C->control = DEVICE_CORE;
C->length = sizeof(C);
C->length = sizeof(XDeviceCoreState);
C->status = c->status;
C->iscore = c->iscore;

139
lib/libXi/src/XGetDProp.c Normal file
View File

@ -0,0 +1,139 @@
/************************************************************
Copyright 2008 Peter Hutterer
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.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the author shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the author.
*/
/***********************************************************************
* XGetDeviceProperties - get an input device's properties.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/Xlibint.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include "XIint.h"
int
XGetDeviceProperty(Display* dpy, XDevice* dev,
Atom property, long offset, long length, Bool delete,
Atom req_type, Atom *actual_type, int *actual_format,
unsigned long *nitems, unsigned long *bytes_after,
unsigned char **prop)
{
xGetDevicePropertyReq *req;
xGetDevicePropertyReply rep;
long nbytes, rbytes;
XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
return 1;
GetReq(GetDeviceProperty, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_GetDeviceProperty;
req->deviceid = dev->device_id;
req->property = property;
req->type = req_type;
req->longOffset = offset;
req->longLength = length;
req->delete = delete;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
SyncHandle ();
return 1;
}
*prop = (unsigned char *) NULL;
if (rep.propertyType != None) {
/*
* One extra byte is malloced than is needed to contain the property
* data, but this last byte is null terminated and convenient for
* returning string properties, so the client doesn't then have to
* recopy the string to make it null terminated.
*/
switch (rep.format) {
case 8:
nbytes = rep.nItems;
rbytes = rep.nItems + 1;
if (rbytes > 0 &&
(*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
_XReadPad (dpy, (char *) *prop, nbytes);
break;
case 16:
nbytes = rep.nItems << 1;
rbytes = rep.nItems * sizeof (short) + 1;
if (rbytes > 0 &&
(*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
_XRead16Pad (dpy, (short *) *prop, nbytes);
break;
case 32:
nbytes = rep.nItems << 2;
rbytes = rep.nItems * sizeof (long) + 1;
if (rbytes > 0 &&
(*prop = (unsigned char *) Xmalloc ((unsigned)rbytes)))
_XRead32 (dpy, (long *) *prop, nbytes);
break;
default:
/*
* This part of the code should never be reached. If it is,
* the server sent back a property with an invalid format.
*/
nbytes = rep.length << 2;
_XEatData(dpy, (unsigned long) nbytes);
UnlockDisplay(dpy);
SyncHandle();
return(BadImplementation);
}
if (! *prop) {
_XEatData(dpy, (unsigned long) nbytes);
UnlockDisplay(dpy);
SyncHandle();
return(BadAlloc);
}
(*prop)[rbytes - 1] = '\0';
}
*actual_type = rep.propertyType;
*actual_format = rep.format;
*nitems = rep.nItems;
*bytes_after = rep.bytesAfter;
UnlockDisplay (dpy);
SyncHandle ();
return Success;
}

View File

@ -0,0 +1,82 @@
/************************************************************
Copyright 2008 Peter Hutterer
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.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the author shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the author.
*/
/***********************************************************************
* XListDeviceProperties - List an input device's properties.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/Xlibint.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include "XIint.h"
Atom*
XListDeviceProperties(Display* dpy, XDevice* dev, int *nprops_return)
{
xListDevicePropertiesReq *req;
xListDevicePropertiesReply rep;
XExtDisplayInfo *info = XInput_find_display(dpy);
Atom *props = NULL;
LockDisplay(dpy);
*nprops_return = 0;
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
goto cleanup;
GetReq(ListDeviceProperties, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_ListDeviceProperties;
req->deviceid = dev->device_id;
if (!_XReply(dpy, (xReply*)&rep, 0, xFalse))
goto cleanup;
if (rep.nAtoms) {
props = (Atom*)Xmalloc(rep.nAtoms * sizeof(Atom));
if (!props)
{
_XEatData(dpy, rep.nAtoms << 2);
goto cleanup;
}
_XRead32(dpy, props, rep.nAtoms << 2);
}
*nprops_return = rep.nAtoms;
cleanup:
UnlockDisplay(dpy);
SyncHandle();
return props;
}