Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xeyes/dist initial import of xeyes-1.2.0
details: https://anonhg.NetBSD.org/xsrc/rev/fab67c900a54
branches: trunk
changeset: 10785:fab67c900a54
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Aug 23 21:27:55 2021 +0000
description:
initial import of xeyes-1.2.0
diffstat:
external/mit/xeyes/dist/ChangeLog | 91 +-
external/mit/xeyes/dist/Eyes.c | 313 +-
external/mit/xeyes/dist/Eyes.h | 2 +
external/mit/xeyes/dist/EyesP.h | 16 +
external/mit/xeyes/dist/Makefile.am | 6 +-
external/mit/xeyes/dist/Makefile.in | 115 +-
external/mit/xeyes/dist/README.md | 18 +
external/mit/xeyes/dist/aclocal.m4 | 2309 ++++----
external/mit/xeyes/dist/config.guess | 1488 +++--
external/mit/xeyes/dist/config.h.in | 13 +-
external/mit/xeyes/dist/config.sub | 2874 +++++-----
external/mit/xeyes/dist/configure | 7999 ++++++++++++++++--------------
external/mit/xeyes/dist/configure.ac | 12 +-
external/mit/xeyes/dist/depcomp | 10 +-
external/mit/xeyes/dist/install-sh | 172 +-
external/mit/xeyes/dist/man/Makefile.in | 21 +-
external/mit/xeyes/dist/missing | 16 +-
external/mit/xeyes/dist/xeyes.c | 26 +-
18 files changed, 8459 insertions(+), 7042 deletions(-)
diffs (truncated from 21758 to 300 lines):
diff -r 2c04bb3a5561 -r fab67c900a54 external/mit/xeyes/dist/ChangeLog
--- a/external/mit/xeyes/dist/ChangeLog Mon Aug 23 21:20:37 2021 +0000
+++ b/external/mit/xeyes/dist/ChangeLog Mon Aug 23 21:27:55 2021 +0000
@@ -1,3 +1,92 @@
+commit adde23dc8724dc6f793b0c68143dc34818f7f6f4
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date: Sun Aug 1 16:41:00 2021 -0700
+
+ xeyes 1.2.0
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 09e50de77da82430cbada93cf58544af2441fd83
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date: Sun Aug 1 16:38:48 2021 -0700
+
+ Remove redundant declaration of hypot() for SVR4 systems
+
+ Fixes gcc warning:
+ Eyes.c:54:15: warning: redundant redeclaration of ‘hypot’ [-Wredundant-decls]
+ extern double hypot(double, double);
+ ^~~~~
+
+ since it's already declared in <math.h>
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 7517441ffa1aecb6f565217149762267d145e11e
+Author: Keith Packard <keithp%keithp.com@localhost>
+Date: Mon Mar 23 08:55:53 2020 -0700
+
+ Clean up compiler warnings
+
+ Add (char *) casts to initializers in Xt structs.
+ Remove unused variables.
+
+ Signed-off-by: Keith Packard <keithp%keithp.com@localhost>
+
+commit 420c2d8517246c9e422739cadb7acb29e35a3bed
+Author: Keith Packard <keithp%keithp.com@localhost>
+Date: Wed Aug 7 12:17:24 2013 +0200
+
+ Use XI2 raw events to notice when mouse moves [v2]
+
+ v2:
+ We only need Xi version 2.0, not 2.2
+ Suggested-by: Peter Hutterer <peter.hutterer%who-t.net@localhost>
+
+ Signed-off-by: Keith Packard <keithp%keithp.com@localhost>
+
+commit 3f2af30bd94ea3012bc1d1bde82f7c9a1c4dea27
+Author: Keith Packard <keithp%keithp.com@localhost>
+Date: Fri Jul 26 18:46:45 2013 -0700
+
+ Add support for the 'Present' extension. [v3]
+
+ This makes updating the eyes nicely vblank synchronized.
+
+ v2:
+ Ensure extensions exist before calling query_version
+
+ These calls add calls to xcb_get_extension_data before calling
+ query_version calls, as those calls will mark the connection
+ with an error if made against an X server without the
+ extension present.
+
+ Suggested-by: Uli Schlachter <psychon%znc.in@localhost>
+
+ v3:
+ check the 'present' field in the return from
+ xcb_get_extension_data; the xcb_get_extension_data call will
+ always succeed (save for out of memory), the only way to tell
+ if the extension is supported in the target X server is to
+ test the 'present' field in the query extension reply value.
+
+ Signed-off-by: Keith Packard <keithp%keithp.com@localhost>
+
+commit 46dac260d384e034aaabd576d9b818d39f4821c6
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date: Wed Nov 21 17:02:46 2018 -0800
+
+ Update configure.ac bug URL for gitlab migration
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 7922b89288d463a29f742fbb48ab38b3ec485dff
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date: Fri Nov 16 21:56:11 2018 -0800
+
+ Update README for gitlab migration
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
commit abb6802af0d82c196fd94b8dc94549ba64754cb5
Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
Date: Fri Mar 9 17:24:55 2018 -0800
@@ -508,7 +597,7 @@
configure cache, you cache it, and the cached value is probably wrong.
commit c903caebf875d510cbd1f720ccc02bd03250d7c6
-Author: Søren Sandmann Pedersen <sandmann%daimi.au.dk@localhost>
+Author: Søren Sandmann Pedersen <sandmann%daimi.au.dk@localhost>
Date: Fri Jul 1 18:07:18 2005 +0000
Xeyes build system
diff -r 2c04bb3a5561 -r fab67c900a54 external/mit/xeyes/dist/Eyes.c
--- a/external/mit/xeyes/dist/Eyes.c Mon Aug 23 21:20:37 2021 +0000
+++ b/external/mit/xeyes/dist/Eyes.c Mon Aug 23 21:27:55 2021 +0000
@@ -48,36 +48,40 @@
# include <X11/extensions/shape.h>
# include <X11/Xlibint.h>
# include <stdlib.h>
-
-#if (defined(SVR4) || defined(SYSV) && defined(i386))
-extern double hypot(double, double);
-#endif
+# include <X11/extensions/XInput2.h>
#define offset(field) XtOffsetOf(EyesRec, eyes.field)
#define goffset(field) XtOffsetOf(WidgetRec, core.field)
static XtResource resources[] = {
- {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
+ {(char *) XtNwidth, (char *) XtCWidth, XtRDimension, sizeof(Dimension),
goffset(width), XtRImmediate, (XtPointer) 150},
- {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
+ {(char *) XtNheight, (char *) XtCHeight, XtRDimension, sizeof(Dimension),
goffset(height), XtRImmediate, (XtPointer) 100},
- {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
- offset(pixel[PART_PUPIL]), XtRString, XtDefaultForeground},
- {XtNoutline, XtCForeground, XtRPixel, sizeof(Pixel),
- offset(pixel[PART_OUTLINE]), XtRString, XtDefaultForeground},
- {XtNcenterColor, XtCBackground, XtRPixel, sizeof (Pixel),
- offset(pixel[PART_CENTER]), XtRString, XtDefaultBackground},
- {XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof (Boolean),
+ {(char *) XtNforeground, (char *) XtCForeground, XtRPixel, sizeof(Pixel),
+ offset(pixel[PART_PUPIL]), XtRString, (char *) XtDefaultForeground},
+ {(char *) XtNbackgroundPixmap, (char *) XtCPixmap, XtRPixmap, sizeof(Pixmap),
+ XtOffsetOf(CoreRec,core.background_pixmap),
+ XtRImmediate, (XtPointer)None},
+ {(char *) XtNoutline, (char *) XtCForeground, XtRPixel, sizeof(Pixel),
+ offset(pixel[PART_OUTLINE]), XtRString, (char *) XtDefaultForeground},
+ {(char *) XtNcenterColor, (char *) XtCBackground, XtRPixel, sizeof (Pixel),
+ offset(pixel[PART_CENTER]), XtRString, (char *) XtDefaultBackground},
+ {(char *) XtNreverseVideo, (char *) 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),
+ {(char *) XtNbackingStore, (char *) XtCBackingStore, (char *) XtRBackingStore, sizeof (int),
+ offset (backing_store), XtRString, (char *) "default"},
+ {(char *) XtNshapeWindow, (char *) XtCShapeWindow, XtRBoolean, sizeof (Boolean),
offset (shape_window), XtRImmediate, (XtPointer) TRUE},
#ifdef XRENDER
- {XtNrender, XtCBoolean, XtRBoolean, sizeof(Boolean),
+ {(char *) XtNrender, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
offset(render), XtRImmediate, (XtPointer) TRUE },
#endif
- {XtNdistance, XtCBoolean, XtRBoolean, sizeof(Boolean),
+#ifdef PRESENT
+ {(char *) XtNpresent, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
+ offset(present), XtRImmediate, (XtPointer) TRUE },
+#endif
+ {(char *) XtNdistance, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
offset(distance), XtRImmediate, (XtPointer) FALSE },
};
@@ -113,6 +117,218 @@
WidgetClass eyesWidgetClass = (WidgetClass) &eyesClassRec;
+#ifdef PRESENT
+static void CheckPresent(EyesWidget w) {
+ const xcb_query_extension_reply_t *xfixes_ext_reply;
+ const xcb_query_extension_reply_t *damage_ext_reply;
+ const xcb_query_extension_reply_t *present_ext_reply;
+ xcb_xfixes_query_version_cookie_t xfixes_cookie;
+ xcb_xfixes_query_version_reply_t *xfixes_reply;
+ xcb_damage_query_version_cookie_t damage_cookie;
+ xcb_damage_query_version_reply_t *damage_reply;
+ xcb_present_query_version_cookie_t present_cookie;
+ xcb_present_query_version_reply_t *present_reply;
+
+ if (!w->eyes.present)
+ return;
+
+ xcb_prefetch_extension_data(xt_xcb(w), &xcb_xfixes_id);
+ xcb_prefetch_extension_data(xt_xcb(w), &xcb_damage_id);
+ xcb_prefetch_extension_data(xt_xcb(w), &xcb_present_id);
+
+ xfixes_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_xfixes_id);
+ damage_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_damage_id);
+ present_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_present_id);
+ if (xfixes_ext_reply == NULL || !xfixes_ext_reply->present
+ || damage_ext_reply == NULL || !damage_ext_reply->present
+ || present_ext_reply == NULL || !present_ext_reply->present)
+ {
+ w->eyes.present = FALSE;
+ }
+
+ if (!w->eyes.present)
+ return;
+
+ /* Now tell the server which versions of the extensions we support */
+ xfixes_cookie = xcb_xfixes_query_version(xt_xcb(w),
+ XCB_XFIXES_MAJOR_VERSION,
+ XCB_XFIXES_MINOR_VERSION);
+
+ damage_cookie = xcb_damage_query_version(xt_xcb(w),
+ XCB_DAMAGE_MAJOR_VERSION,
+ XCB_DAMAGE_MINOR_VERSION);
+
+ present_cookie = xcb_present_query_version(xt_xcb(w),
+ XCB_PRESENT_MAJOR_VERSION,
+ XCB_PRESENT_MINOR_VERSION);
+
+ xfixes_reply = xcb_xfixes_query_version_reply(xt_xcb(w),
+ xfixes_cookie,
+ NULL);
+ free(xfixes_reply);
+
+ damage_reply = xcb_damage_query_version_reply(xt_xcb(w),
+ damage_cookie,
+ NULL);
+ free(damage_reply);
+
+ present_reply = xcb_present_query_version_reply(xt_xcb(w),
+ present_cookie,
+ NULL);
+ free(present_reply);
+}
+
+static void MakePresentData(EyesWidget w) {
+
+ if (!w->eyes.present)
+ return;
+
+ if (!w->eyes.back_buffer) {
+ xcb_create_pixmap(xt_xcb(w),
+ w->core.depth,
+ w->eyes.back_buffer = xcb_generate_id(xt_xcb(w)),
+ XtWindow(w),
+ w->core.width,
+ w->core.height);
+ }
+ if (!w->eyes.back_damage) {
+ xcb_damage_create(xt_xcb(w),
+ w->eyes.back_damage = xcb_generate_id(xt_xcb(w)),
+ w->eyes.back_buffer,
+ XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY);
+ xcb_xfixes_create_region(xt_xcb(w),
+ w->eyes.back_region = xcb_generate_id(xt_xcb(w)),
+ 0, NULL);
+ }
+}
+
+static void UpdatePresent(EyesWidget w) {
+ if (w->eyes.back_buffer) {
+ xcb_damage_subtract(xt_xcb(w),
+ w->eyes.back_damage,
+ None,
+ w->eyes.back_region);
+ xcb_present_pixmap(xt_xcb(w),
+ XtWindow(w),
+ w->eyes.back_buffer,
+ 0,
+ None,
+ w->eyes.back_region,
+ 0, 0,
+ None,
+ None,
+ None,
+ 0,
+ 0, 1, 0,
+ 0, NULL);
+ }
+}
+
+#endif
+
+#ifdef PRESENT
+#define EyesDrawable(w) (w->eyes.back_buffer ? w->eyes.back_buffer : XtWindow(w))
+#else
+#define EyesDrawable(w) XtWindow(w)
+#endif
+
+static void draw_it_core(EyesWidget w);
+
+static void EyesGeneric(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
+{
+ draw_it_core((EyesWidget) w);
+}
+
+struct root_listen_list {
+ struct root_listen_list *next;
+ Widget widget;
+};
+
+static struct root_listen_list *root_listen_list;
+
Home |
Main Index |
Thread Index |
Old Index