Update to xeyes 1.1.0
This commit is contained in:
parent
21c33a1b92
commit
1cb4ae42c1
@ -1,25 +1,372 @@
|
||||
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
commit a2c8bc28a57474cda77769292aabe1d9f73839a5
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Fri Dec 18 09:44:32 2009 -0500
|
||||
|
||||
* configure.ac:
|
||||
Update package version for X11R7 release.
|
||||
xeyes 1.1.0
|
||||
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
commit e134d57ac54b77269252b7f73f0e84d08ded5212
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Nov 26 09:19:29 2009 -0500
|
||||
|
||||
* configure.ac:
|
||||
Update package version number for final X11R7 release candidate.
|
||||
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
|
||||
|
||||
Now that the INSTALL file is generated.
|
||||
Allows running make maintainer-clean.
|
||||
|
||||
2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
commit 6e387e3329722dc9a09b481dbd15f441f39aa054
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Wed Oct 28 14:08:44 2009 -0400
|
||||
|
||||
* Makefile.am:
|
||||
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
|
||||
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
|
||||
|
||||
Add missing INSTALL file. Use standard GNU file on building tarball
|
||||
README may have been updated
|
||||
Remove AUTHORS file as it is empty and no content available yet.
|
||||
Remove NEWS file as it is empty and no content available yet.
|
||||
|
||||
2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
commit 34ddbb1213cc4c061409cf6e3883683f6ed8dc92
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Tue Oct 27 15:07:00 2009 -0400
|
||||
|
||||
* configure.ac:
|
||||
Update package version number for X11R7 RC3 release.
|
||||
Deploy the new XORG_DEFAULT_OPTIONS #24242
|
||||
|
||||
This macro aggregate a number of existing macros that sets commmon
|
||||
X.Org components configuration options. It shields the configuration file from
|
||||
future changes.
|
||||
|
||||
2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
commit d1c05b6bb985c00447b3eef598fc6c9b5a95134b
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Mon Oct 26 22:08:14 2009 -0400
|
||||
|
||||
* configure.ac:
|
||||
Update package version number for RC1 release.
|
||||
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
|
||||
|
||||
ChangeLog filename is known to Automake and requires no further
|
||||
coding in the makefile.
|
||||
|
||||
commit 3195a5dc486e6daa2ed9754ffd7d2e12da7906a2
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Oct 22 12:33:51 2009 -0400
|
||||
|
||||
.gitignore: use common defaults with custom section # 24239
|
||||
|
||||
Using common defaults will reduce errors and maintenance.
|
||||
Only the very small or inexistent custom section need periodic maintenance
|
||||
when the structure of the component changes. Do not edit defaults.
|
||||
|
||||
commit 6054c8c98d25752492b57b8ad7fd1d3679d23369
|
||||
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
|
||||
Date: Wed Oct 21 12:46:56 2009 -0700
|
||||
|
||||
This is not a GNU project, so declare it foreign.
|
||||
|
||||
On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
|
||||
> On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
|
||||
> > I noticed an INSTALL file in xlsclients and libXvMC today, and it
|
||||
> > was quite annoying to work around since 'autoreconf -fvi' replaces
|
||||
> > it and git wants to commit it. Should these files even be in git?
|
||||
> > Can I nuke them for the betterment of humanity and since they get
|
||||
> > created by autoreconf anyways?
|
||||
>
|
||||
> See https://bugs.freedesktop.org/show_bug.cgi?id=24206
|
||||
|
||||
As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
|
||||
of the INSTALL file. It is also part of the 24206 solution.
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
|
||||
|
||||
commit 59a5be39cdbddb070cd4e4758848fd08aa5910a4
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Mon Oct 5 18:07:53 2009 -0400
|
||||
|
||||
Bump version for second beta release.
|
||||
|
||||
1.0.991 as first beta of 1.1.0.
|
||||
|
||||
(The first beta was meant to be 1.0.90 rather than 1.0.99.
|
||||
Having gotten that wrong, switch to three-digit release numbers
|
||||
for subsequent betas.)
|
||||
|
||||
commit 610889785caf41146505458beccc5e3662c233db
|
||||
Author: Dylan Simon <dylan@dylex.net>
|
||||
Date: Sun Oct 4 17:41:30 2009 -0400
|
||||
|
||||
New -distance mapping option
|
||||
|
||||
Distance mapping makes more efficient use of eye space.
|
||||
|
||||
Signed-off-by: Dylan Simon <dylan@dylex.net>
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit dc0f730a4a49f0e436a0a915955997b07bbf56e0
|
||||
Author: Dylan Simon <dylan@dylex.net>
|
||||
Date: Sun Oct 4 17:38:43 2009 -0400
|
||||
|
||||
Cleanup and simplify calculation and drawing
|
||||
|
||||
By transforming the eyes’s space when calculating where to place the
|
||||
pupils, the code effectively assumed that EYE_HEIGHT == EYE_WIDTH.
|
||||
|
||||
Make this assumption explicit and remove calculations which
|
||||
are therefore unnecessary.
|
||||
|
||||
Clean up related code and, consequently, reduced redraw time
|
||||
and tearing.
|
||||
|
||||
Signed-off-by: Dylan Simon <dylan@dylex.net>
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit 7cc3aa8ce30990e12e7b102f61dfcaaf8baa4d16
|
||||
Author: Dylan Simon <dylan@dylex.net>
|
||||
Date: Sun Oct 4 17:29:59 2009 -0400
|
||||
|
||||
Fix excessive redraw bug
|
||||
|
||||
introduced by dbb8401026c421d64a2962e6ac6eb900f6dc141e
|
||||
|
||||
Signed-off-by: Dylan Simon <dylan@dylex.net>
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit 6d9fdcfb076f4c261b071cc5c454c8b9ce560e68
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Sat Oct 3 21:32:48 2009 -0400
|
||||
|
||||
Bump version for beta release.
|
||||
|
||||
1.0.99 as first beta of 1.1.0.
|
||||
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit 41f604009c3c7b4a3d05311faa649c8152494700
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Sat Oct 3 21:28:35 2009 -0400
|
||||
|
||||
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
|
||||
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit fd754c702c789f15ac1c0241e50dbb23aed354fc
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Oct 1 14:53:59 2009 -0700
|
||||
|
||||
Add README with pointers to mailing lists, bugzilla, & git
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 5e825a140f4022b88dd7a1a20a9a01b653f1a95c
|
||||
Author: Dylan Simon <dylan@dylex.net>
|
||||
Date: Sun Sep 27 14:44:11 2009 -0400
|
||||
|
||||
Add xrender support
|
||||
|
||||
Optionally draw all components (except shape) with xrender.
|
||||
Enabled by default. Xlib rendering can be restored by
|
||||
"configure --without-xrender" or "xeyes +render".
|
||||
|
||||
Signed-off-by: Dylan Simon <dylan@dylex.net>
|
||||
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
||||
|
||||
commit dbb8401026c421d64a2962e6ac6eb900f6dc141e
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri Jul 17 19:21:15 2009 +1000
|
||||
|
||||
Split drawing code into multiple functions.
|
||||
|
||||
commit 85f1441378b47c01aa68dd1479850c4cd1c8eb72
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri Jul 17 18:41:07 2009 +1000
|
||||
|
||||
Remove unused NUM_EYES define.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit e8bd6bcaf2cbe8306cc9a4821e8ea7a54a7e56a2
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Tue Jan 13 17:42:23 2009 -0200
|
||||
|
||||
Ansification and compile warning fixes.
|
||||
|
||||
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
|
||||
make distcheck and all gcc 4.3 and sparse warnings.
|
||||
|
||||
commit 7e3208d263050d0ad4502f7d7d7d64d7ec84a4ad
|
||||
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
|
||||
Date: Thu Nov 27 22:46:26 2008 -0800
|
||||
|
||||
AM_CFLAGS instead of xeyes_CFLAGS to shut automake up
|
||||
|
||||
commit 53488fad7ef10ff8c4835bcd497cd3980be38b7a
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Thu Dec 6 16:36:49 2007 -0500
|
||||
|
||||
Replace static ChangeLog with dist-hook to generate from git log
|
||||
|
||||
commit ab449267ea2fcae6261e57f42bfb54d2205c470f
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Mon Sep 3 05:50:58 2007 -0400
|
||||
|
||||
Add *~ to .gitignore to skip patch/emacs droppings
|
||||
|
||||
commit 07dfa4cb3ff0c9a94bea85db0e571fbb2cfe9161
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Thu Aug 23 19:24:22 2007 -0400
|
||||
|
||||
Rename .cvsignore to .gitignore
|
||||
|
||||
commit ecb2095318d7233e8cfa3a58626c31f770be6ee7
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Wed Dec 21 02:29:27 2005 +0000
|
||||
|
||||
Update package version for X11R7 release.
|
||||
|
||||
commit 3aae44d6b3c9332f73fbeacb39e9c928a2002164
|
||||
Author: Adam Jackson <ajax@nwnk.net>
|
||||
Date: Mon Dec 19 16:22:21 2005 +0000
|
||||
|
||||
Stub COPYING files
|
||||
|
||||
commit 41b039a4861154d82bdd3e6ea1b6697b16205b93
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Thu Dec 15 00:23:44 2005 +0000
|
||||
|
||||
Update package version number for final X11R7 release candidate.
|
||||
|
||||
commit bc99738464950416207d43a4a4db970bd0563d56
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Tue Dec 6 22:47:59 2005 +0000
|
||||
|
||||
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
|
||||
|
||||
commit 266b7244e16ec2f82bdfb1bd346951761e0d27e2
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Sat Dec 3 05:48:58 2005 +0000
|
||||
|
||||
Update package version number for X11R7 RC3 release.
|
||||
|
||||
commit 4298a74b61a6aa8ac36b2d820e147e44ab0f5e32
|
||||
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
|
||||
Date: Mon Nov 28 22:01:19 2005 +0000
|
||||
|
||||
Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
|
||||
update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
|
||||
|
||||
commit 69160791a057704e9a83794420d2349ae8bbbe1c
|
||||
Author: Eric Anholt <anholt@freebsd.org>
|
||||
Date: Mon Nov 21 10:34:38 2005 +0000
|
||||
|
||||
Another pass at .cvsignores for apps.
|
||||
|
||||
commit ba6118981be2d3a058a08cd1621113cc8e4a42f8
|
||||
Author: Eric Anholt <anholt@freebsd.org>
|
||||
Date: Sun Nov 20 22:08:30 2005 +0000
|
||||
|
||||
Add/improve .cvsignore files for apps.
|
||||
|
||||
commit 6772ce855c078b40635ad62f47da741c037e05c5
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Wed Oct 19 02:47:31 2005 +0000
|
||||
|
||||
Update package version number for RC1 release.
|
||||
|
||||
commit 8001fd04f2d893e147b3b21fb4702c54e2919b1d
|
||||
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
|
||||
Date: Mon Oct 17 23:56:00 2005 +0000
|
||||
|
||||
Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
|
||||
work better with BSD make
|
||||
|
||||
commit 1f61a27ce249d94b4be20db22cb84642a4d8a480
|
||||
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
|
||||
Date: Fri Oct 14 00:25:23 2005 +0000
|
||||
|
||||
Use sed to fill in variables in man page
|
||||
|
||||
commit 79456c023b864e06b3ab3c6c93106772286b10ae
|
||||
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
|
||||
Date: Mon Aug 1 20:25:07 2005 +0000
|
||||
|
||||
Install man pages to section 1 instead of section m (Patch from Donnie
|
||||
Berkholz)
|
||||
|
||||
commit 8119360377d17461578cfb26e07c98df6bbe560d
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Fri Jul 29 21:22:10 2005 +0000
|
||||
|
||||
Various changes preparing packages for RC0:
|
||||
- Verify and update package version numbers as needed
|
||||
- Implement versioning scheme
|
||||
- Change bug address to point to bugzilla bug entry form
|
||||
- Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
|
||||
reenable it)
|
||||
- Fix makedepend to use pkgconfig and pass distcheck
|
||||
- Update build script to build macros first
|
||||
- Update modular Xorg version
|
||||
|
||||
commit 9da2af8715937921c718733e309471f565614c99
|
||||
Author: Kevin E Martin <kem@kem.org>
|
||||
Date: Thu Jul 28 15:56:50 2005 +0000
|
||||
|
||||
Fix distcheck for remaining apps
|
||||
|
||||
commit ae49bb18f5feab2b70e6faae046bb26058421d61
|
||||
Author: Adam Jackson <ajax@nwnk.net>
|
||||
Date: Wed Jul 20 19:31:31 2005 +0000
|
||||
|
||||
Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
|
||||
configure cache, you cache it, and the cached value is probably wrong.
|
||||
|
||||
commit c903caebf875d510cbd1f720ccc02bd03250d7c6
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Fri Jul 1 18:06:56 2005 +0000
|
||||
|
||||
Xeyes build system
|
||||
|
||||
commit 160c9f4f69bb2fd273c6223c7e4c6cda1523757f
|
||||
Author: Egbert Eich <eich@suse.de>
|
||||
Date: Fri Apr 23 19:54:25 2004 +0000
|
||||
|
||||
Merging XORG-CURRENT into trunk
|
||||
|
||||
commit 37db892d918e67bb13652d48f76d3da4c67f5d58
|
||||
Author: Egbert Eich <eich@suse.de>
|
||||
Date: Sun Mar 14 08:34:58 2004 +0000
|
||||
|
||||
Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
|
||||
|
||||
commit e1eda60fd5b4634652d0505a13a2516515d8ff88
|
||||
Author: Egbert Eich <eich@suse.de>
|
||||
Date: Wed Mar 3 12:12:43 2004 +0000
|
||||
|
||||
Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
|
||||
|
||||
commit f8eb90ffc747cd45db069212031e1e41c797d378
|
||||
Author: Egbert Eich <eich@suse.de>
|
||||
Date: Thu Feb 26 13:36:02 2004 +0000
|
||||
|
||||
readding XFree86's cvs IDs
|
||||
|
||||
commit cd8a87f77a8ee8b4d29c34cc2066a840964fe3b8
|
||||
Author: Egbert Eich <eich@suse.de>
|
||||
Date: Thu Feb 26 09:23:45 2004 +0000
|
||||
|
||||
Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
|
||||
|
||||
commit bd6d337e78c95b6cd3d831f6e6ad44afc6595520
|
||||
Author: Kaleb Keithley <kaleb@freedesktop.org>
|
||||
Date: Tue Nov 25 19:28:50 2003 +0000
|
||||
|
||||
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
|
||||
|
||||
commit 2d36e110b8dbfa073bd533d7d0c720a4e51339a4
|
||||
Author: Kaleb Keithley <kaleb@freedesktop.org>
|
||||
Date: Fri Nov 14 16:49:00 2003 +0000
|
||||
|
||||
XFree86 4.3.0.1
|
||||
|
||||
commit dfc0320568e5237fff45b3f7fb6f332d1bf5e9bf
|
||||
Author: Kaleb Keithley <kaleb@freedesktop.org>
|
||||
Date: Fri Nov 14 16:49:00 2003 +0000
|
||||
|
||||
Initial revision
|
||||
|
476
app/xeyes/Eyes.c
476
app/xeyes/Eyes.c
@ -36,6 +36,10 @@ from the X Consortium.
|
||||
* a widget which follows the mouse around
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
# include <X11/Xos.h>
|
||||
# include <stdio.h>
|
||||
# include <X11/IntrinsicP.h>
|
||||
@ -44,6 +48,8 @@ from the X Consortium.
|
||||
# include "EyesP.h"
|
||||
# include <math.h>
|
||||
# include <X11/extensions/shape.h>
|
||||
# include <X11/Xlibint.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
#if (defined(SVR4) || defined(SYSV) && defined(i386))
|
||||
extern double hypot(double, double);
|
||||
@ -58,42 +64,46 @@ static XtResource resources[] = {
|
||||
{XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
|
||||
goffset(height), XtRImmediate, (XtPointer) 100},
|
||||
{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
|
||||
offset(puppixel), XtRString, XtDefaultForeground},
|
||||
offset(pixel[PART_PUPIL]), XtRString, XtDefaultForeground},
|
||||
{XtNoutline, XtCForeground, XtRPixel, sizeof(Pixel),
|
||||
offset(outline), XtRString, XtDefaultForeground},
|
||||
offset(pixel[PART_OUTLINE]), XtRString, XtDefaultForeground},
|
||||
{XtNcenterColor, XtCBackground, XtRPixel, sizeof (Pixel),
|
||||
offset(center), XtRString, XtDefaultBackground},
|
||||
offset(pixel[PART_CENTER]), XtRString, XtDefaultBackground},
|
||||
{XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof (Boolean),
|
||||
offset (reverse_video), XtRImmediate, (XtPointer) FALSE},
|
||||
{XtNbackingStore, XtCBackingStore, XtRBackingStore, sizeof (int),
|
||||
offset (backing_store), XtRString, "default"},
|
||||
{XtNshapeWindow, XtCShapeWindow, XtRBoolean, sizeof (Boolean),
|
||||
offset (shape_window), XtRImmediate, (XtPointer) TRUE},
|
||||
#ifdef XRENDER
|
||||
{XtNrender, XtCBoolean, XtRBoolean, sizeof(Boolean),
|
||||
offset(render), XtRImmediate, (XtPointer) TRUE },
|
||||
#endif
|
||||
{XtNdistance, XtCBoolean, XtRBoolean, sizeof(Boolean),
|
||||
offset(distance), XtRImmediate, (XtPointer) FALSE },
|
||||
};
|
||||
|
||||
#undef offset
|
||||
#undef goffset
|
||||
|
||||
# define NUM_EYES 2
|
||||
# define EYE_X(n) ((n) * 2.0)
|
||||
# define EYE_Y(n) (0.0)
|
||||
# define EYE_OFFSET (0.1) /* padding between eyes */
|
||||
# define EYE_THICK (0.175) /* thickness of eye rim */
|
||||
# define BALL_WIDTH (0.3)
|
||||
# define BALL_PAD (0.05)
|
||||
# define EYE_WIDTH (2.0 - (EYE_THICK + EYE_OFFSET) * 2)
|
||||
# define EYE_HEIGHT EYE_WIDTH
|
||||
# define EYE_HWIDTH (EYE_WIDTH / 2.0)
|
||||
# define EYE_HHEIGHT (EYE_HEIGHT / 2.0)
|
||||
# define BALL_HEIGHT BALL_WIDTH
|
||||
# define BALL_DIST ((EYE_WIDTH - BALL_WIDTH) / 2.0 - BALL_PAD)
|
||||
# define BALL_DIAM (0.3)
|
||||
# define BALL_PAD (0.175)
|
||||
# define EYE_DIAM (2.0 - (EYE_THICK + EYE_OFFSET) * 2)
|
||||
# define BALL_DIST ((EYE_DIAM - BALL_DIAM) / 2.0 - BALL_PAD)
|
||||
# define W_MIN_X (-1.0 + EYE_OFFSET)
|
||||
# define W_MAX_X (3.0 - EYE_OFFSET)
|
||||
# define W_MIN_Y (-1.0 + EYE_OFFSET)
|
||||
# define W_MAX_Y (1.0 - EYE_OFFSET)
|
||||
|
||||
# define TPOINT_NONE (-1000) /* special value meaning "not yet set" */
|
||||
# define TPointEqual(a, b) ((a).x == (b).x && (a).y == (b).y)
|
||||
# define XPointEqual(a, b) ((a).x == (b).x && (a).y == (b).y)
|
||||
# define AngleBetween(A, A0, A1) (A0 <= A1 ? A0 <= A && A <= A1 : \
|
||||
A0 <= A || A <= A1)
|
||||
|
||||
static int delays[] = { 50, 100, 200, 400, 0 };
|
||||
|
||||
@ -116,6 +126,9 @@ static void Initialize (
|
||||
XtGCMask valuemask;
|
||||
XGCValues myXGCV;
|
||||
int shape_event_base, shape_error_base;
|
||||
#ifdef XRENDER
|
||||
enum EyesPart i;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* set the colors if reverse video; these are the colors used:
|
||||
@ -124,110 +137,232 @@ static void Initialize (
|
||||
* foreground - text, ticks black
|
||||
* border - border black (foreground)
|
||||
*
|
||||
* This doesn't completely work since the parent has already made up a
|
||||
* This doesn't completely work since the parent has already made up a
|
||||
* border. Sigh.
|
||||
*/
|
||||
if (w->eyes.reverse_video) {
|
||||
Pixel fg = w->eyes.puppixel;
|
||||
Pixel fg = w->eyes.pixel[PART_PUPIL];
|
||||
Pixel bg = w->core.background_pixel;
|
||||
|
||||
if (w->core.border_pixel == fg)
|
||||
w->core.border_pixel = bg;
|
||||
if (w->eyes.outline == fg)
|
||||
w->eyes.outline = bg;
|
||||
if (w->eyes.center == bg)
|
||||
w->eyes.center = fg;
|
||||
w->eyes.puppixel = bg;
|
||||
if (w->eyes.pixel[PART_OUTLINE] == fg)
|
||||
w->eyes.pixel[PART_OUTLINE] = bg;
|
||||
if (w->eyes.pixel[PART_CENTER] == bg)
|
||||
w->eyes.pixel[PART_CENTER] = fg;
|
||||
w->eyes.pixel[PART_PUPIL] = bg;
|
||||
w->core.background_pixel = fg;
|
||||
}
|
||||
|
||||
myXGCV.foreground = w->eyes.puppixel;
|
||||
myXGCV.foreground = w->eyes.pixel[PART_PUPIL];
|
||||
myXGCV.background = w->core.background_pixel;
|
||||
valuemask = GCForeground | GCBackground;
|
||||
w->eyes.pupGC = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
w->eyes.gc[PART_PUPIL] = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
|
||||
myXGCV.foreground = w->eyes.outline;
|
||||
myXGCV.foreground = w->eyes.pixel[PART_OUTLINE];
|
||||
valuemask = GCForeground | GCBackground;
|
||||
w->eyes.outGC = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
w->eyes.gc[PART_OUTLINE] = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
|
||||
myXGCV.foreground = w->eyes.center;
|
||||
myXGCV.background = w->eyes.puppixel;
|
||||
myXGCV.foreground = w->eyes.pixel[PART_CENTER];
|
||||
myXGCV.background = w->eyes.pixel[PART_PUPIL];
|
||||
valuemask = GCForeground | GCBackground;
|
||||
w->eyes.centerGC = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
w->eyes.gc[PART_CENTER] = XtGetGC(gnew, valuemask, &myXGCV);
|
||||
|
||||
w->eyes.update = 0;
|
||||
/* wait for Realize to add the timeout */
|
||||
w->eyes.interval_id = 0;
|
||||
|
||||
w->eyes.pupil[0].x = w->eyes.pupil[1].x = -1000;
|
||||
w->eyes.pupil[0].y = w->eyes.pupil[1].y = -1000;
|
||||
w->eyes.pupil[0].x = w->eyes.pupil[1].x = TPOINT_NONE;
|
||||
w->eyes.pupil[0].y = w->eyes.pupil[1].y = TPOINT_NONE;
|
||||
|
||||
w->eyes.mouse.x = w->eyes.mouse.y = -1000;
|
||||
w->eyes.mouse.x = w->eyes.mouse.y = TPOINT_NONE;
|
||||
|
||||
if (w->eyes.shape_window && !XShapeQueryExtension (XtDisplay (w),
|
||||
&shape_event_base,
|
||||
&shape_error_base))
|
||||
w->eyes.shape_window = False;
|
||||
w->eyes.shape_mask = 0;
|
||||
w->eyes.shapeGC = 0;
|
||||
w->eyes.gc[PART_SHAPE] = NULL;
|
||||
|
||||
#ifdef XRENDER
|
||||
for (i = 0; i < PART_SHAPE; i ++) {
|
||||
XColor c;
|
||||
XRenderColor rc;
|
||||
|
||||
c.pixel = w->eyes.pixel[i];
|
||||
XQueryColor(XtDisplay (w), w->core.colormap, &c);
|
||||
|
||||
rc.red = c.red;
|
||||
rc.green = c.green;
|
||||
rc.blue = c.blue;
|
||||
rc.alpha = -1;
|
||||
w->eyes.fill[i] = XRenderCreateSolidFill(XtDisplay (w), &rc);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void eyeLiner (
|
||||
EyesWidget w,
|
||||
Drawable d,
|
||||
GC outgc,
|
||||
GC centergc,
|
||||
int num)
|
||||
static void
|
||||
drawEllipse(EyesWidget w, enum EyesPart part,
|
||||
double centerx, double centery,
|
||||
double oldx, double oldy,
|
||||
double diam)
|
||||
{
|
||||
Display *dpy = XtDisplay(w);
|
||||
const TRectangle tpos = {
|
||||
centerx - diam/2.0,
|
||||
centery - diam/2.0,
|
||||
diam, diam };
|
||||
TRectangle pos;
|
||||
Trectangle(&w->eyes.t, &tpos, &pos);
|
||||
|
||||
TFillArc (dpy, d, outgc, &w->eyes.t,
|
||||
EYE_X(num) - EYE_HWIDTH - EYE_THICK,
|
||||
EYE_Y(num) - EYE_HHEIGHT - EYE_THICK,
|
||||
EYE_WIDTH + EYE_THICK * 2.0,
|
||||
EYE_HEIGHT + EYE_THICK * 2.0,
|
||||
90 * 64, 360 * 64);
|
||||
if (centergc) {
|
||||
TFillArc (dpy, d, centergc, &w->eyes.t,
|
||||
EYE_X(num) - EYE_HWIDTH,
|
||||
EYE_Y(num) - EYE_HHEIGHT,
|
||||
EYE_WIDTH, EYE_HEIGHT,
|
||||
90 * 64, 360 * 64);
|
||||
if (part == PART_CLEAR) {
|
||||
XFillRectangle(XtDisplay(w), XtWindow(w),
|
||||
w->eyes.gc[PART_CENTER],
|
||||
(int)pos.x, (int)pos.y,
|
||||
(int)pos.width+2, (int)pos.height+2);
|
||||
return;
|
||||
}
|
||||
#ifdef XRENDER
|
||||
if (w->eyes.render && part != PART_SHAPE && (!w->eyes.shape_window ||
|
||||
part != PART_OUTLINE) &&
|
||||
w->eyes.picture) {
|
||||
int n, i;
|
||||
double hd, c, s, sx, sy, x, y, px, py;
|
||||
XPointDouble *p;
|
||||
|
||||
pos.x = pos.x + pos.width/2.0;
|
||||
pos.y = pos.y + pos.height/2.0;
|
||||
|
||||
/* determine number of segments to draw */
|
||||
hd = hypot(pos.width, pos.height)/2;
|
||||
n = (M_PI / acos(hd/(hd+1.0))) + 0.5;
|
||||
if (n < 2) n = 2;
|
||||
|
||||
c = cos(M_PI/n);
|
||||
s = sin(M_PI/n);
|
||||
sx = -(pos.width*s)/pos.height;
|
||||
sy = (pos.height*s)/pos.width;
|
||||
|
||||
n *= 2;
|
||||
p = Xmalloc(sizeof(*p)*n);
|
||||
if (!p)
|
||||
return;
|
||||
x = 0;
|
||||
y = pos.height/2.0;
|
||||
for (i = 0; i < n; i ++)
|
||||
{
|
||||
p[i].x = x + pos.x;
|
||||
p[i].y = y + pos.y;
|
||||
px = x;
|
||||
py = y;
|
||||
x = c*px + sx*py;
|
||||
y = c*py + sy*px;
|
||||
}
|
||||
|
||||
if (oldx != TPOINT_NONE || oldy != TPOINT_NONE)
|
||||
drawEllipse(w, PART_CLEAR, oldx, oldy,
|
||||
TPOINT_NONE, TPOINT_NONE, diam);
|
||||
|
||||
XRenderCompositeDoublePoly(XtDisplay(w), PictOpOver,
|
||||
w->eyes.fill[part], w->eyes.picture,
|
||||
XRenderFindStandardFormat(XtDisplay(w),
|
||||
PictStandardA8),
|
||||
0, 0, 0, 0, p, n, 0);
|
||||
|
||||
Xfree(p);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (oldx != TPOINT_NONE || oldy != TPOINT_NONE)
|
||||
drawEllipse(w, PART_CLEAR, oldx, oldy,
|
||||
TPOINT_NONE, TPOINT_NONE, diam);
|
||||
|
||||
XFillArc(XtDisplay(w),
|
||||
part == PART_SHAPE ? w->eyes.shape_mask : XtWindow(w),
|
||||
w->eyes.gc[part],
|
||||
(int)(pos.x + 0.5), (int)(pos.y + 0.5),
|
||||
(int)(pos.width + 0.0), (int)(pos.height + 0.0),
|
||||
90*64, 360*64);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
eyeLiner(EyesWidget w,
|
||||
Boolean draw,
|
||||
int num)
|
||||
{
|
||||
drawEllipse(w, draw ? PART_OUTLINE : PART_SHAPE,
|
||||
EYE_X(num), EYE_Y(num),
|
||||
TPOINT_NONE, TPOINT_NONE,
|
||||
EYE_DIAM + 2.0*EYE_THICK);
|
||||
if (draw) {
|
||||
drawEllipse(w, PART_CENTER, EYE_X(num), EYE_Y(num),
|
||||
TPOINT_NONE, TPOINT_NONE,
|
||||
EYE_DIAM);
|
||||
}
|
||||
}
|
||||
|
||||
static TPoint computePupil (
|
||||
int num,
|
||||
TPoint mouse)
|
||||
TPoint mouse,
|
||||
const TRectangle *screen)
|
||||
{
|
||||
double cx, cy;
|
||||
double dist;
|
||||
double angle;
|
||||
double x, y;
|
||||
double h;
|
||||
double dx, dy;
|
||||
double cosa, sina;
|
||||
TPoint ret;
|
||||
|
||||
dx = mouse.x - EYE_X(num);
|
||||
dy = mouse.y - EYE_Y(num);
|
||||
if (dx == 0 && dy == 0) {
|
||||
cx = EYE_X(num);
|
||||
cy = EYE_Y(num);
|
||||
} else {
|
||||
cx = EYE_X(num); dx = mouse.x - cx;
|
||||
cy = EYE_Y(num); dy = mouse.y - cy;
|
||||
if (dx == 0 && dy == 0);
|
||||
else {
|
||||
angle = atan2 ((double) dy, (double) dx);
|
||||
cosa = cos (angle);
|
||||
sina = sin (angle);
|
||||
h = hypot (EYE_HHEIGHT * cosa, EYE_HWIDTH * sina);
|
||||
x = (EYE_HWIDTH * EYE_HHEIGHT) * cosa / h;
|
||||
y = (EYE_HWIDTH * EYE_HHEIGHT) * sina / h;
|
||||
dist = BALL_DIST * hypot (x, y);
|
||||
dist = BALL_DIST;
|
||||
if (screen)
|
||||
{
|
||||
/* use distance mapping */
|
||||
double x0, y0, x1, y1;
|
||||
double a[4];
|
||||
x0 = screen->x - cx;
|
||||
y0 = screen->y - cy;
|
||||
x1 = x0 + screen->width;
|
||||
y1 = y0 + screen->height;
|
||||
a[0] = atan2(y0, x0);
|
||||
a[1] = atan2(y1, x0);
|
||||
a[2] = atan2(y1, x1);
|
||||
a[3] = atan2(y0, x1);
|
||||
if (AngleBetween(angle, a[0], a[1]))
|
||||
{
|
||||
/* left */
|
||||
dist *= dx / x0;
|
||||
}
|
||||
else if (AngleBetween(angle, a[1], a[2]))
|
||||
{
|
||||
/* bottom */
|
||||
dist *= dy / y1;
|
||||
}
|
||||
else if (AngleBetween(angle, a[2], a[3]))
|
||||
{
|
||||
/* right */
|
||||
dist *= dx / x1;
|
||||
}
|
||||
else if (AngleBetween(angle, a[3], a[0]))
|
||||
{
|
||||
/* top */
|
||||
dist *= dy / y0;
|
||||
}
|
||||
if (dist > BALL_DIST)
|
||||
dist = BALL_DIST;
|
||||
}
|
||||
if (dist > hypot ((double) dx, (double) dy)) {
|
||||
cx = dx + EYE_X(num);
|
||||
cy = dy + EYE_Y(num);
|
||||
cx += dx;
|
||||
cy += dy;
|
||||
} else {
|
||||
cx = dist * cosa + EYE_X(num);
|
||||
cy = dist * sina + EYE_Y(num);
|
||||
cx += dist * cosa;
|
||||
cy += dist * sina;
|
||||
}
|
||||
}
|
||||
ret.x = cx;
|
||||
@ -236,88 +371,118 @@ static TPoint computePupil (
|
||||
}
|
||||
|
||||
static void computePupils (
|
||||
EyesWidget w,
|
||||
TPoint mouse,
|
||||
TPoint pupils[2])
|
||||
{
|
||||
pupils[0] = computePupil (0, mouse);
|
||||
pupils[1] = computePupil (1, mouse);
|
||||
TRectangle screen, *sp = NULL;
|
||||
if (w->eyes.distance) {
|
||||
Window r, cw;
|
||||
int x, y;
|
||||
r = RootWindowOfScreen(w->core.screen);
|
||||
XTranslateCoordinates(XtDisplay(w), XtWindow(w), r, 0, 0, &x, &y, &cw);
|
||||
screen.x = Tx(-x, -y, &w->eyes.t);
|
||||
screen.y = Ty(-x, -y, &w->eyes.t);
|
||||
screen.width = Twidth (w->core.screen->width, w->core.screen->height,
|
||||
&w->eyes.t);
|
||||
screen.height = Theight(w->core.screen->width, w->core.screen->height,
|
||||
&w->eyes.t);
|
||||
sp = &screen;
|
||||
}
|
||||
pupils[0] = computePupil (0, mouse, sp);
|
||||
pupils[1] = computePupil (1, mouse, sp);
|
||||
}
|
||||
|
||||
static void eyeBall (
|
||||
EyesWidget w,
|
||||
GC gc,
|
||||
int num)
|
||||
static void
|
||||
eyeBall(EyesWidget w,
|
||||
Boolean draw,
|
||||
TPoint *old,
|
||||
int num)
|
||||
{
|
||||
Display *dpy = XtDisplay(w);
|
||||
Window win = XtWindow(w);
|
||||
|
||||
TFillArc (dpy, win, gc, &w->eyes.t,
|
||||
w->eyes.pupil[num].x - BALL_WIDTH / 2.0,
|
||||
w->eyes.pupil[num].y - BALL_HEIGHT / 2.0,
|
||||
BALL_WIDTH, BALL_HEIGHT,
|
||||
90 * 64, 360 * 64);
|
||||
drawEllipse(w, draw ? PART_PUPIL : PART_CLEAR,
|
||||
w->eyes.pupil[num].x, w->eyes.pupil[num].y,
|
||||
old ? old->x : TPOINT_NONE, old ? old->y : TPOINT_NONE,
|
||||
BALL_DIAM);
|
||||
}
|
||||
|
||||
static void repaint_window (EyesWidget w)
|
||||
{
|
||||
if (XtIsRealized ((Widget) w)) {
|
||||
eyeLiner (w, XtWindow (w), w->eyes.outGC, w->eyes.centerGC, 0);
|
||||
eyeLiner (w, XtWindow (w), w->eyes.outGC, w->eyes.centerGC, 1);
|
||||
computePupils (w->eyes.mouse, w->eyes.pupil);
|
||||
eyeBall (w, w->eyes.pupGC, 0);
|
||||
eyeBall (w, w->eyes.pupGC, 1);
|
||||
eyeLiner (w, TRUE, 0);
|
||||
eyeLiner (w, TRUE, 1);
|
||||
computePupils (w, w->eyes.mouse, w->eyes.pupil);
|
||||
eyeBall (w, TRUE, NULL, 0);
|
||||
eyeBall (w, TRUE, NULL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drawEye(EyesWidget w, TPoint newpupil, int num)
|
||||
{
|
||||
XPoint xnewpupil, xpupil;
|
||||
|
||||
xpupil.x = Xx(w->eyes.pupil[num].x, w->eyes.pupil[num].y, &w->eyes.t);
|
||||
xpupil.y = Xy(w->eyes.pupil[num].x, w->eyes.pupil[num].y, &w->eyes.t);
|
||||
xnewpupil.x = Xx(newpupil.x, newpupil.y, &w->eyes.t);
|
||||
xnewpupil.y = Xy(newpupil.x, newpupil.y, &w->eyes.t);
|
||||
if (
|
||||
#ifdef XRENDER
|
||||
w->eyes.picture ? !TPointEqual(w->eyes.pupil[num], newpupil) :
|
||||
#endif
|
||||
!XPointEqual(xpupil, xnewpupil)) {
|
||||
TPoint oldpupil = w->eyes.pupil[num];
|
||||
w->eyes.pupil[num] = newpupil;
|
||||
eyeBall (w, TRUE, &oldpupil, num);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drawEyes(EyesWidget w, TPoint mouse)
|
||||
{
|
||||
TPoint newpupil[2];
|
||||
int num;
|
||||
|
||||
if (TPointEqual (mouse, w->eyes.mouse)) {
|
||||
if (delays[w->eyes.update + 1] != 0)
|
||||
++w->eyes.update;
|
||||
return;
|
||||
}
|
||||
computePupils (w, mouse, newpupil);
|
||||
for (num = 0; num < 2; num ++) {
|
||||
drawEye(w, newpupil[num], num);
|
||||
}
|
||||
|
||||
w->eyes.mouse = mouse;
|
||||
w->eyes.update = 0;
|
||||
}
|
||||
|
||||
static void draw_it_core(EyesWidget w)
|
||||
{
|
||||
Window rep_root, rep_child;
|
||||
int rep_rootx, rep_rooty;
|
||||
unsigned int rep_mask;
|
||||
int dx, dy;
|
||||
TPoint mouse;
|
||||
Display *dpy = XtDisplay (w);
|
||||
Window win = XtWindow (w);
|
||||
|
||||
XQueryPointer (dpy, win, &rep_root, &rep_child,
|
||||
&rep_rootx, &rep_rooty, &dx, &dy, &rep_mask);
|
||||
mouse.x = Tx(dx, dy, &w->eyes.t);
|
||||
mouse.y = Ty(dx, dy, &w->eyes.t);
|
||||
|
||||
drawEyes(w, mouse);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static void draw_it (
|
||||
XtPointer client_data,
|
||||
XtIntervalId *id) /* unused */
|
||||
{
|
||||
EyesWidget w = (EyesWidget)client_data;
|
||||
Window rep_root, rep_child;
|
||||
int rep_rootx, rep_rooty;
|
||||
unsigned int rep_mask;
|
||||
int dx, dy;
|
||||
TPoint mouse;
|
||||
Display *dpy = XtDisplay (w);
|
||||
Window win = XtWindow (w);
|
||||
TPoint newpupil[2];
|
||||
XPoint xnewpupil, xpupil;
|
||||
|
||||
if (XtIsRealized((Widget)w)) {
|
||||
XQueryPointer (dpy, win, &rep_root, &rep_child,
|
||||
&rep_rootx, &rep_rooty, &dx, &dy, &rep_mask);
|
||||
mouse.x = Tx(dx, dy, &w->eyes.t);
|
||||
mouse.y = Ty(dx, dy, &w->eyes.t);
|
||||
if (!TPointEqual (mouse, w->eyes.mouse)) {
|
||||
computePupils (mouse, newpupil);
|
||||
xpupil.x = Xx(w->eyes.pupil[0].x, w->eyes.pupil[0].y, &w->eyes.t);
|
||||
xpupil.y = Xy(w->eyes.pupil[0].x, w->eyes.pupil[0].y, &w->eyes.t);
|
||||
xnewpupil.x = Xx(newpupil[0].x, newpupil[0].y, &w->eyes.t);
|
||||
xnewpupil.y = Xy(newpupil[0].x, newpupil[0].y, &w->eyes.t);
|
||||
if (!XPointEqual (xpupil, xnewpupil)) {
|
||||
if (w->eyes.pupil[0].x != -1000 || w->eyes.pupil[0].y != -1000)
|
||||
eyeBall (w, w->eyes.centerGC, 0);
|
||||
w->eyes.pupil[0] = newpupil[0];
|
||||
eyeBall (w, w->eyes.pupGC, 0);
|
||||
}
|
||||
xpupil.x = Xx(w->eyes.pupil[1].x, w->eyes.pupil[1].y, &w->eyes.t);
|
||||
xpupil.y = Xy(w->eyes.pupil[1].x, w->eyes.pupil[1].y, &w->eyes.t);
|
||||
xnewpupil.x = Xx(newpupil[1].x, newpupil[1].y, &w->eyes.t);
|
||||
xnewpupil.y = Xy(newpupil[1].x, newpupil[1].y, &w->eyes.t);
|
||||
if (!XPointEqual (xpupil, xnewpupil)) {
|
||||
if (w->eyes.pupil[1].x != -1 || w->eyes.pupil[1].y != -1)
|
||||
eyeBall (w, w->eyes.centerGC, 1);
|
||||
w->eyes.pupil[1] = newpupil[1];
|
||||
eyeBall (w, w->eyes.pupGC, 1);
|
||||
}
|
||||
w->eyes.mouse = mouse;
|
||||
w->eyes.update = 0;
|
||||
} else {
|
||||
if (delays[w->eyes.update + 1] != 0)
|
||||
++w->eyes.update;
|
||||
}
|
||||
draw_it_core(w);
|
||||
}
|
||||
w->eyes.interval_id =
|
||||
XtAppAddTimeOut(XtWidgetToApplicationContext((Widget) w),
|
||||
@ -329,27 +494,35 @@ static void Resize (Widget gw)
|
||||
EyesWidget w = (EyesWidget) gw;
|
||||
XGCValues xgcv;
|
||||
Widget parent;
|
||||
Display *dpy = XtDisplay (w);
|
||||
int x, y;
|
||||
|
||||
if (XtIsRealized (gw))
|
||||
{
|
||||
XClearWindow (XtDisplay (w), XtWindow (w));
|
||||
XClearWindow (dpy, XtWindow (w));
|
||||
SetTransform (&w->eyes.t,
|
||||
0, w->core.width,
|
||||
w->core.height, 0,
|
||||
W_MIN_X, W_MAX_X,
|
||||
W_MIN_Y, W_MAX_Y);
|
||||
#ifdef XRENDER
|
||||
if (w->eyes.picture) {
|
||||
XRenderFreePicture(dpy, w->eyes.picture);
|
||||
w->eyes.picture = 0;
|
||||
}
|
||||
#endif
|
||||
if (w->eyes.shape_window) {
|
||||
w->eyes.shape_mask = XCreatePixmap (XtDisplay (w), XtWindow (w),
|
||||
w->eyes.shape_mask = XCreatePixmap (dpy, XtWindow (w),
|
||||
w->core.width, w->core.height, 1);
|
||||
if (!w->eyes.shapeGC)
|
||||
w->eyes.shapeGC = XCreateGC (XtDisplay (w), w->eyes.shape_mask, 0, &xgcv);
|
||||
XSetForeground (XtDisplay (w), w->eyes.shapeGC, 0);
|
||||
XFillRectangle (XtDisplay (w), w->eyes.shape_mask, w->eyes.shapeGC, 0, 0,
|
||||
w->core.width, w->core.height);
|
||||
XSetForeground (XtDisplay (w), w->eyes.shapeGC, 1);
|
||||
eyeLiner (w, w->eyes.shape_mask, w->eyes.shapeGC, (GC) 0, 0);
|
||||
eyeLiner (w, w->eyes.shape_mask, w->eyes.shapeGC, (GC) 0, 1);
|
||||
if (!w->eyes.gc[PART_SHAPE])
|
||||
w->eyes.gc[PART_SHAPE] = XCreateGC (dpy, w->eyes.shape_mask,
|
||||
0, &xgcv);
|
||||
XSetForeground (dpy, w->eyes.gc[PART_SHAPE], 0);
|
||||
XFillRectangle (dpy, w->eyes.shape_mask, w->eyes.gc[PART_SHAPE],
|
||||
0, 0, w->core.width, w->core.height);
|
||||
XSetForeground (dpy, w->eyes.gc[PART_SHAPE], 1);
|
||||
eyeLiner (w, FALSE, 0);
|
||||
eyeLiner (w, FALSE, 1);
|
||||
x = y = 0;
|
||||
for (parent = (Widget) w; XtParent (parent); parent = XtParent (parent)) {
|
||||
x += parent->core.x + parent->core.border_width;
|
||||
@ -357,8 +530,19 @@ static void Resize (Widget gw)
|
||||
}
|
||||
XShapeCombineMask (XtDisplay (parent), XtWindow (parent), ShapeBounding,
|
||||
x, y, w->eyes.shape_mask, ShapeSet);
|
||||
XFreePixmap (XtDisplay (w), w->eyes.shape_mask);
|
||||
XFreePixmap (dpy, w->eyes.shape_mask);
|
||||
}
|
||||
#ifdef XRENDER
|
||||
if (w->eyes.render) {
|
||||
XRenderPictureAttributes pa;
|
||||
XRenderPictFormat *pf;
|
||||
pf = XRenderFindVisualFormat(dpy,
|
||||
DefaultVisualOfScreen(w->core.screen));
|
||||
if (pf)
|
||||
w->eyes.picture = XRenderCreatePicture(dpy, XtWindow (w),
|
||||
pf, 0, &pa);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -384,12 +568,16 @@ static void Realize (
|
||||
static void Destroy (Widget gw)
|
||||
{
|
||||
EyesWidget w = (EyesWidget)gw;
|
||||
int i;
|
||||
|
||||
if (w->eyes.interval_id)
|
||||
XtRemoveTimeOut (w->eyes.interval_id);
|
||||
XtReleaseGC(gw, w->eyes.pupGC);
|
||||
XtReleaseGC(gw, w->eyes.outGC);
|
||||
XtReleaseGC(gw, w->eyes.centerGC);
|
||||
for (i = 0; i < PART_MAX; i ++)
|
||||
XtReleaseGC(gw, w->eyes.gc[i]);
|
||||
#ifdef XRENDER
|
||||
if (w->eyes.picture)
|
||||
XRenderFreePicture (XtDisplay(w), w->eyes.picture);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -401,10 +589,10 @@ static void Redisplay(
|
||||
EyesWidget w;
|
||||
|
||||
w = (EyesWidget) gw;
|
||||
w->eyes.pupil[0].x = -1000;
|
||||
w->eyes.pupil[0].y = -1000;
|
||||
w->eyes.pupil[1].x = -1000;
|
||||
w->eyes.pupil[1].y = -1000;
|
||||
w->eyes.pupil[0].x = TPOINT_NONE;
|
||||
w->eyes.pupil[0].y = TPOINT_NONE;
|
||||
w->eyes.pupil[1].x = TPOINT_NONE;
|
||||
w->eyes.pupil[1].y = TPOINT_NONE;
|
||||
(void) repaint_window ((EyesWidget)gw);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,20 @@
|
||||
#define XtNshapeWindow "shapeWindow"
|
||||
#define XtCShapeWindow "ShapeWindow"
|
||||
|
||||
#define XtNrender "render"
|
||||
#define XtNdistance "distance"
|
||||
|
||||
enum EyesPart {
|
||||
PART_CLEAR = -1,
|
||||
|
||||
PART_OUTLINE,
|
||||
PART_CENTER,
|
||||
PART_PUPIL,
|
||||
|
||||
PART_SHAPE,
|
||||
PART_MAX
|
||||
};
|
||||
|
||||
typedef struct _EyesRec *EyesWidget; /* completely defined in EyesPrivate.h */
|
||||
typedef struct _EyesClassRec *EyesWidgetClass; /* completely defined in EyesPrivate.h */
|
||||
|
||||
|
@ -7,19 +7,17 @@
|
||||
|
||||
#include "Eyes.h"
|
||||
#include <X11/CoreP.h>
|
||||
#ifdef XRENDER
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#endif
|
||||
#include "transform.h"
|
||||
|
||||
#define SEG_BUFF_SIZE 128
|
||||
|
||||
/* New fields for the eyes widget instance record */
|
||||
typedef struct {
|
||||
Pixel puppixel; /* foreground pixel */
|
||||
Pixel outline; /* outline pixel */
|
||||
Pixel center; /* inside pixel */
|
||||
GC outGC; /* pointer to GraphicsContext */
|
||||
GC pupGC; /* pointer to GraphicsContext */
|
||||
GC centerGC; /* pointer to GraphicsContext */
|
||||
GC shapeGC; /* pointer to GraphicsContext */
|
||||
Pixel pixel[PART_SHAPE];
|
||||
GC gc[PART_MAX];
|
||||
/* start of graph stuff */
|
||||
int backing_store; /* backing store variety */
|
||||
Boolean reverse_video; /* swap fg and bg pixels */
|
||||
@ -31,6 +29,12 @@ typedef struct {
|
||||
Transform maskt;
|
||||
XtIntervalId interval_id;
|
||||
Pixmap shape_mask; /* window shape */
|
||||
#ifdef XRENDER
|
||||
Boolean render;
|
||||
Picture picture;
|
||||
Picture fill[PART_SHAPE];
|
||||
#endif
|
||||
Boolean distance;
|
||||
} EyesPart;
|
||||
|
||||
/* Full instance record declaration */
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
bin_PROGRAMS = xeyes
|
||||
|
||||
xeyes_CFLAGS = $(XEYES_CFLAGS)
|
||||
AM_CFLAGS = $(XEYES_CFLAGS)
|
||||
xeyes_LDADD = $(XEYES_LIBS) -lm
|
||||
|
||||
xeyes_SOURCES = \
|
||||
@ -42,6 +42,7 @@ appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST += $(appman_PRE)
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA)
|
||||
|
||||
SED = sed
|
||||
@ -66,4 +67,15 @@ MAN_SUBSTS = \
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
INSTALL:
|
||||
$(INSTALL_CMD)
|
||||
|
||||
ChangeLog:
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog INSTALL
|
||||
|
@ -77,8 +77,7 @@ CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_xeyes_OBJECTS = xeyes-Eyes.$(OBJEXT) xeyes-transform.$(OBJEXT) \
|
||||
xeyes-xeyes.$(OBJEXT)
|
||||
am_xeyes_OBJECTS = Eyes.$(OBJEXT) transform.$(OBJEXT) xeyes.$(OBJEXT)
|
||||
xeyes_OBJECTS = $(am_xeyes_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
xeyes_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
@ -111,7 +110,6 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
@ -127,7 +125,10 @@ AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
@ -136,9 +137,11 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
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@
|
||||
@ -170,9 +173,9 @@ STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XEYES_CFLAGS = @XEYES_CFLAGS@
|
||||
XEYES_LIBS = @XEYES_LIBS@
|
||||
XRENDER_CFLAGS = @XRENDER_CFLAGS@
|
||||
XRENDER_LIBS = @XRENDER_LIBS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
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__include = @am__include@
|
||||
@ -187,28 +190,36 @@ build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
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@
|
||||
target_alias = @target_alias@
|
||||
xeyes_CFLAGS = $(XEYES_CFLAGS)
|
||||
AM_CFLAGS = $(XEYES_CFLAGS)
|
||||
xeyes_LDADD = $(XEYES_LIBS) -lm
|
||||
xeyes_SOURCES = \
|
||||
Eyes.c \
|
||||
@ -224,6 +235,7 @@ appman_PRE = \
|
||||
EXTRA_DIST = eyes.bit eyesmask.bit $(appman_PRE)
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA)
|
||||
SED = sed
|
||||
|
||||
@ -255,15 +267,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@ -332,9 +344,9 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xeyes-Eyes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xeyes-transform.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xeyes-xeyes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Eyes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xeyes.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@ -349,48 +361,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
xeyes-Eyes.o: Eyes.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-Eyes.o -MD -MP -MF "$(DEPDIR)/xeyes-Eyes.Tpo" -c -o xeyes-Eyes.o `test -f 'Eyes.c' || echo '$(srcdir)/'`Eyes.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-Eyes.Tpo" "$(DEPDIR)/xeyes-Eyes.Po"; else rm -f "$(DEPDIR)/xeyes-Eyes.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Eyes.c' object='xeyes-Eyes.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-Eyes.o `test -f 'Eyes.c' || echo '$(srcdir)/'`Eyes.c
|
||||
|
||||
xeyes-Eyes.obj: Eyes.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-Eyes.obj -MD -MP -MF "$(DEPDIR)/xeyes-Eyes.Tpo" -c -o xeyes-Eyes.obj `if test -f 'Eyes.c'; then $(CYGPATH_W) 'Eyes.c'; else $(CYGPATH_W) '$(srcdir)/Eyes.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-Eyes.Tpo" "$(DEPDIR)/xeyes-Eyes.Po"; else rm -f "$(DEPDIR)/xeyes-Eyes.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Eyes.c' object='xeyes-Eyes.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-Eyes.obj `if test -f 'Eyes.c'; then $(CYGPATH_W) 'Eyes.c'; else $(CYGPATH_W) '$(srcdir)/Eyes.c'; fi`
|
||||
|
||||
xeyes-transform.o: transform.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-transform.o -MD -MP -MF "$(DEPDIR)/xeyes-transform.Tpo" -c -o xeyes-transform.o `test -f 'transform.c' || echo '$(srcdir)/'`transform.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-transform.Tpo" "$(DEPDIR)/xeyes-transform.Po"; else rm -f "$(DEPDIR)/xeyes-transform.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transform.c' object='xeyes-transform.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-transform.o `test -f 'transform.c' || echo '$(srcdir)/'`transform.c
|
||||
|
||||
xeyes-transform.obj: transform.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-transform.obj -MD -MP -MF "$(DEPDIR)/xeyes-transform.Tpo" -c -o xeyes-transform.obj `if test -f 'transform.c'; then $(CYGPATH_W) 'transform.c'; else $(CYGPATH_W) '$(srcdir)/transform.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-transform.Tpo" "$(DEPDIR)/xeyes-transform.Po"; else rm -f "$(DEPDIR)/xeyes-transform.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transform.c' object='xeyes-transform.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-transform.obj `if test -f 'transform.c'; then $(CYGPATH_W) 'transform.c'; else $(CYGPATH_W) '$(srcdir)/transform.c'; fi`
|
||||
|
||||
xeyes-xeyes.o: xeyes.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-xeyes.o -MD -MP -MF "$(DEPDIR)/xeyes-xeyes.Tpo" -c -o xeyes-xeyes.o `test -f 'xeyes.c' || echo '$(srcdir)/'`xeyes.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-xeyes.Tpo" "$(DEPDIR)/xeyes-xeyes.Po"; else rm -f "$(DEPDIR)/xeyes-xeyes.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xeyes.c' object='xeyes-xeyes.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-xeyes.o `test -f 'xeyes.c' || echo '$(srcdir)/'`xeyes.c
|
||||
|
||||
xeyes-xeyes.obj: xeyes.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -MT xeyes-xeyes.obj -MD -MP -MF "$(DEPDIR)/xeyes-xeyes.Tpo" -c -o xeyes-xeyes.obj `if test -f 'xeyes.c'; then $(CYGPATH_W) 'xeyes.c'; else $(CYGPATH_W) '$(srcdir)/xeyes.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xeyes-xeyes.Tpo" "$(DEPDIR)/xeyes-xeyes.Po"; else rm -f "$(DEPDIR)/xeyes-xeyes.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xeyes.c' object='xeyes-xeyes.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xeyes_CFLAGS) $(CFLAGS) -c -o xeyes-xeyes.obj `if test -f 'xeyes.c'; then $(CYGPATH_W) 'xeyes.c'; else $(CYGPATH_W) '$(srcdir)/xeyes.c'; fi`
|
||||
uninstall-info-am:
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@ -487,6 +457,9 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
@ -616,6 +589,7 @@ distclean-generic:
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
@ -671,8 +645,8 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
|
||||
distclean distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-appmanDATA install-binPROGRAMS install-data \
|
||||
@ -686,7 +660,17 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
INSTALL:
|
||||
$(INSTALL_CMD)
|
||||
|
||||
ChangeLog:
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog INSTALL
|
||||
# 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:
|
||||
|
@ -0,0 +1,25 @@
|
||||
xeyes - a follow the mouse X demo, using the X SHAPE 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/app/xeyes
|
||||
|
||||
http://cgit.freedesktop.org/xorg/app/xeyes
|
||||
|
||||
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
|
||||
|
199
app/xeyes/aclocal.m4
vendored
199
app/xeyes/aclocal.m4
vendored
@ -995,6 +995,7 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
@ -1031,27 +1032,24 @@ dnl of the copyright holder.
|
||||
# your configure.ac with the minimum required version, such as:
|
||||
# XORG_MACROS_VERSION(1.1)
|
||||
#
|
||||
# To force at least a version with this macro defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
# To ensure that this macro is defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION],
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
AC_DEFUN([XORG_MACROS_VERSION],[
|
||||
[XORG_MACROS_needed_version=$1
|
||||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
|
||||
[XORG_MACROS_version=1.1.5
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
|
||||
fi
|
||||
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
|
||||
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
|
||||
fi
|
||||
AC_MSG_RESULT([yes, $XORG_MACROS_version])
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.3.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
|
||||
m4_if(m4_version_compare(vers_have, [$1]), -1,
|
||||
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
|
||||
m4_undefine([vers_have])
|
||||
m4_undefine([maj_have])
|
||||
m4_undefine([maj_needed])
|
||||
]) # XORG_MACROS_VERSION
|
||||
|
||||
# XORG_PROG_RAWCPP()
|
||||
@ -1076,6 +1074,10 @@ else
|
||||
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS=-undef
|
||||
AC_MSG_RESULT([yes])
|
||||
# under Cygwin unix is still defined even with -undef
|
||||
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS="-undef -ansi"
|
||||
AC_MSG_RESULT([yes, with -ansi])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
fi
|
||||
@ -1188,10 +1190,16 @@ AC_SUBST([ADMIN_MAN_DIR])
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
HAVE_DEFS_ENT=no
|
||||
else
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(LINUXDOC, linuxdoc)
|
||||
AC_PATH_PROG(PS2PDF, ps2pdf)
|
||||
@ -1240,7 +1248,9 @@ AC_SUBST(MAKE_HTML)
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
@ -1297,6 +1307,57 @@ AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_DOCBOOK
|
||||
|
||||
# XORG_WITH_XMLTO
|
||||
# ----------------
|
||||
# Minimum version: 1.5.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-xmlto option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the xmlto package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
|
||||
# XMLTO: returns the path of the xmlto program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-xmlto: 'yes' user instructs the module to use xmlto
|
||||
# 'no' user instructs the module not to use xmlto
|
||||
#
|
||||
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_XMLTO],[
|
||||
AC_ARG_VAR([XMLTO], [Path to xmlto command])
|
||||
AC_ARG_WITH(xmlto,
|
||||
AS_HELP_STRING([--with-xmlto],
|
||||
[Use xmlto to regenerate documentation (default: yes, if installed)]),
|
||||
[use_xmlto=$withval], [use_xmlto=auto])
|
||||
|
||||
if test "x$use_xmlto" = x"auto"; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
|
||||
have_xmlto=no
|
||||
else
|
||||
have_xmlto=yes
|
||||
fi
|
||||
elif test "x$use_xmlto" = x"yes" ; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_WARN([--with-xmlto=yes specified but xmlto not found in PATH])
|
||||
fi
|
||||
have_xmlto=yes
|
||||
elif test "x$use_xmlto" = x"no" ; then
|
||||
if test "x$XMLTO" != "x"; then
|
||||
AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
|
||||
fi
|
||||
have_xmlto=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
]) # XORG_CHECK_XMLTO
|
||||
|
||||
# XORG_CHECK_MALLOC_ZERO
|
||||
# ----------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -1306,7 +1367,7 @@ AC_SUBST(MAKE_HTML)
|
||||
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
|
||||
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
|
||||
AC_ARG_ENABLE(malloc0returnsnull,
|
||||
AC_HELP_STRING([--enable-malloc0returnsnull],
|
||||
AS_HELP_STRING([--enable-malloc0returnsnull],
|
||||
[malloc(0) returns NULL (default: auto)]),
|
||||
[MALLOC_ZERO_RETURNS_NULL=$enableval],
|
||||
[MALLOC_ZERO_RETURNS_NULL=auto])
|
||||
@ -1358,7 +1419,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
@ -1399,7 +1460,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
@ -1417,6 +1478,75 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
|
||||
AC_ARG_ENABLE(strict-compilation,
|
||||
AS_HELP_STRING([--enable-strict-compilation],
|
||||
[Enable all warnings from compiler and make them errors (default: disabled)]),
|
||||
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
|
||||
if test "x$STRICT_COMPILE" = "xyes"; then
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
|
||||
if test "x$GCC" = xyes ; then
|
||||
STRICT_CFLAGS="-pedantic -Werror"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-errwarn"
|
||||
elif test "x$INTELCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-Werror"
|
||||
fi
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_MANPAGE_SECTIONS
|
||||
]) # XORG_DEFAULT_OPTIONS
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
@ -1451,7 +1581,7 @@ dnl
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AC_HELP_STRING([--with-release-version=STRING],
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
@ -1463,14 +1593,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
[Major version of this package])
|
||||
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
|
||||
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
|
||||
if test "x$PVM" = "x"; then
|
||||
PVM="0"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
|
||||
[$PVM],
|
||||
[Minor version of this package])
|
||||
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
|
||||
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
|
||||
if test "x$PVP" = "x"; then
|
||||
PVP="0"
|
||||
fi
|
||||
@ -1479,3 +1609,20 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
[Patch version of this package])
|
||||
])
|
||||
|
||||
# XORG_CHANGELOG()
|
||||
# ----------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
|
@ -1,5 +1,32 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -27,5 +54,11 @@
|
||||
/* Patch version of this package */
|
||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to use X Render Extension */
|
||||
#undef XRENDER
|
||||
|
7444
app/xeyes/configure
vendored
7444
app/xeyes/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -22,21 +22,35 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.57])
|
||||
AC_INIT(xeyes,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xeyes)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AC_INIT(xeyes,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xeyes)
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Require xorg-macros: XORG_DEFAULT_OPTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.3)
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XEYES, x11 xt xext xmu)
|
||||
XEYES_CFLAGS="$CWARNFLAGS $XEYES_CFLAGS"
|
||||
AC_SUBST(XEYES_CFLAGS)
|
||||
AC_SUBST(XEYES_LIBS)
|
||||
|
||||
XORG_MANPAGE_SECTIONS
|
||||
XORG_RELEASE_VERSION
|
||||
dnl Optional dependencies
|
||||
AC_ARG_WITH(xrender, AC_HELP_STRING([--with-xrender],[Use Xrender for rendering (Default is YES)]),use_xrender="$withval",use_xrender="try")
|
||||
if test x$use_xrender != xno ; then
|
||||
PKG_CHECK_MODULES(XRENDER, [xrender >= 0.4])
|
||||
XEYES_CFLAGS="$XEYES_CFLAGS $XRENDER_CFLAGS"
|
||||
XEYES_LIBS="$XEYES_LIBS $XRENDER_LIBS"
|
||||
AC_DEFINE([XRENDER],1,[Define to use X Render Extension])
|
||||
fi
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -83,36 +83,26 @@ TDrawArc (
|
||||
#endif
|
||||
|
||||
void
|
||||
TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
|
||||
Display *dpy;
|
||||
Drawable d;
|
||||
GC gc;
|
||||
Transform *t;
|
||||
double x, y, width, height;
|
||||
int angle1, angle2;
|
||||
Trectangle(const Transform *t, const TRectangle *i, TRectangle *o)
|
||||
{
|
||||
int xx, xy, xw, xh;
|
||||
|
||||
xx = Xx(x,y,t);
|
||||
xy = Xy(x,y,t);
|
||||
xw = Xwidth (width, height, t);
|
||||
xh = Xheight (width, height, t);
|
||||
if (xw < 0) {
|
||||
xx += xw;
|
||||
xw = -xw;
|
||||
}
|
||||
if (xh < 0) {
|
||||
xy += xh;
|
||||
xh = -xh;
|
||||
}
|
||||
XFillArc (dpy, d, gc, xx, xy, xw, xh, angle1, angle2);
|
||||
o->x = t->mx * i->x + t->bx;
|
||||
o->y = t->my * i->y + t->by;
|
||||
o->width = t->mx * i->width;
|
||||
o->height = t->my * i->height;
|
||||
if (o->width < 0) {
|
||||
o->x += o->width;
|
||||
o->width = -o->width;
|
||||
}
|
||||
if (o->height < 0) {
|
||||
o->y += o->height;
|
||||
o->height = -o->height;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SetTransform (t, xx1, xx2, xy1, xy2, tx1, tx2, ty1, ty2)
|
||||
Transform *t;
|
||||
int xx1, xx2, xy1, xy2;
|
||||
double tx1, tx2, ty1, ty2;
|
||||
SetTransform (Transform *t,
|
||||
int xx1, int xx2, int xy1, int xy2,
|
||||
double tx1, double tx2, double ty1, double ty2)
|
||||
{
|
||||
t->mx = ((double) xx2 - xx1) / (tx2 - tx1);
|
||||
t->bx = ((double) xx1) - t->mx * tx1;
|
||||
|
@ -26,10 +26,7 @@ typedef struct _TRectangle {
|
||||
# define Twidth(w,h,t) (((double) (w)) / (t)->mx)
|
||||
# define Theight(w,h,t) (((double) (h)) / (t)->my)
|
||||
|
||||
extern void TFillArc (Display *dpy, Drawable d, GC gc,
|
||||
Transform *t,
|
||||
double x, double y, double width, double height,
|
||||
int angle1, int angle2);
|
||||
extern void Trectangle (const Transform *t, const TRectangle *in, TRectangle *out);
|
||||
extern void SetTransform (Transform *t,
|
||||
int xx1, int xx2, int xy1, int xy2,
|
||||
double tx1, double tx2, double ty1, double ty2);
|
||||
|
@ -30,6 +30,10 @@ from the X Consortium.
|
||||
*/
|
||||
/* $XFree86: xc/programs/xeyes/xeyes.c,v 1.3 2000/02/17 14:00:35 dawes Exp $ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <X11/Shell.h>
|
||||
@ -53,7 +57,11 @@ usage(void)
|
||||
fprintf(stderr, " [-shape | +shape]");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr,
|
||||
" [-outline {color}] [-center {color}] [-backing {backing-store}]\n");
|
||||
" [-outline {color}] [-center {color}] [-backing {backing-store}] [-distance]\n");
|
||||
#ifdef XRENDER
|
||||
fprintf(stderr,
|
||||
" [-render | +render]\n");
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -66,6 +74,11 @@ static XrmOptionDescRec options[] = {
|
||||
{"-backing", "*eyes.backingStore", XrmoptionSepArg, NULL},
|
||||
{"-shape", "*eyes.shapeWindow", XrmoptionNoArg, "TRUE"},
|
||||
{"+shape", "*eyes.shapeWindow", XrmoptionNoArg, "FALSE"},
|
||||
#ifdef XRENDER
|
||||
{"-render", "*eyes.render", XrmoptionNoArg, "TRUE"},
|
||||
{"+render", "*eyes.render", XrmoptionNoArg, "FALSE"},
|
||||
#endif
|
||||
{"-distance", "*eyes.distance", XrmoptionNoArg, "TRUE"},
|
||||
};
|
||||
|
||||
static Atom wm_delete_window;
|
||||
|
@ -44,7 +44,17 @@ choose a different width for the window border.
|
||||
uses the SHAPE extension to shape the window. This is the default.
|
||||
.TP 8
|
||||
.B \+shape
|
||||
Disables uses the SHAPE extension to shape the window.
|
||||
disables use of the SHAPE extension to shape the window.
|
||||
.TP 8
|
||||
.B \-render
|
||||
uses Xrender to draw anti-aliased eyes.
|
||||
This is the default if \fIxeyes\fP has been compiled with Xrender support.
|
||||
.TP 8
|
||||
.B \+render
|
||||
disables Xrender and draws traditional eyes.
|
||||
.TP 8
|
||||
.B \-distance
|
||||
uses an alternative mapping, as if the eyes were set back from the screen, thus following the mouse more precisely.
|
||||
.SH "SEE ALSO"
|
||||
X(__miscmansuffix__), X Toolkit documentation
|
||||
.br
|
||||
|
Loading…
Reference in New Issue
Block a user