From e3deacd2af41c9c3b5f6f7f1868abac2600cd820 Mon Sep 17 00:00:00 2001 From: Satoshi Taoka Date: Thu, 1 Apr 1999 03:05:05 +0000 Subject: transparent analog clock for x11 PR: ports/9955 Submitted by: Lars Koeller lkoeller@cc.fh-lippe.de --- x11-clocks/tclock/Makefile | 22 +++++++ x11-clocks/tclock/distinfo | 1 + x11-clocks/tclock/files/patch-aa | 132 +++++++++++++++++++++++++++++++++++++++ x11-clocks/tclock/pkg-comment | 1 + x11-clocks/tclock/pkg-descr | 2 + x11-clocks/tclock/pkg-plist | 1 + 6 files changed, 159 insertions(+) create mode 100644 x11-clocks/tclock/Makefile create mode 100644 x11-clocks/tclock/distinfo create mode 100644 x11-clocks/tclock/files/patch-aa create mode 100644 x11-clocks/tclock/pkg-comment create mode 100644 x11-clocks/tclock/pkg-descr create mode 100644 x11-clocks/tclock/pkg-plist (limited to 'x11-clocks/tclock') diff --git a/x11-clocks/tclock/Makefile b/x11-clocks/tclock/Makefile new file mode 100644 index 000000000000..5b1fdfc32d6e --- /dev/null +++ b/x11-clocks/tclock/Makefile @@ -0,0 +1,22 @@ +# New ports collection makefile for: tclock +# Version required: 1.0.1 +# Date created: So 7 Feb 1999 20:50:43 MET +# Whom: Lars Koeller +# +# $Id$ +# + +DISTNAME= tclock-1.0.1 +CATEGORIES= x11-clocks +MASTER_SITES= ftp://ftp.uni-potsdam.de/pub/X11/tools/clocks/ \ + ftp://ftp.fh-anhalt.de/pub/soft/Xwindow/tools/clocks/ \ + ftp://ftp.uni-bielefeld.de/pub/systems/FreeBSD/lkoeller/ +EXTRACT_SUFX= .tar.Z + +MAINTAINER= Lars.Koeller@Uni-Bielefeled.DE + +NO_WRKSUBDIR= yes +USE_IMAKE= yes +MAN1= tclock.1 + +.include diff --git a/x11-clocks/tclock/distinfo b/x11-clocks/tclock/distinfo new file mode 100644 index 000000000000..9cc20ef16738 --- /dev/null +++ b/x11-clocks/tclock/distinfo @@ -0,0 +1 @@ +MD5 (tclock-1.0.1.tar.Z) = 3eca9837135a69af6fe7214fb0bc6533 diff --git a/x11-clocks/tclock/files/patch-aa b/x11-clocks/tclock/files/patch-aa new file mode 100644 index 000000000000..c5b69a5e1118 --- /dev/null +++ b/x11-clocks/tclock/files/patch-aa @@ -0,0 +1,132 @@ +*** tclock.c Sun Feb 7 20:24:51 1999 +--- work/tclock.c Sun Feb 7 20:34:52 1999 +*************** +*** 22,28 **** +--- 22,31 ---- + */ + + #include ++ #include ++ #include + #include ++ #include + #include + #include + #include +*************** +*** 51,57 **** + int screen_number; + Window rootWindow, mainWindow; + int ShapeEventNumber, ShapeErrorNumber; +! long clock; + struct tm lastTimes, times; + Pixmap border, clip; + GC clearGC, drawGC; +--- 54,60 ---- + int screen_number; + Window rootWindow, mainWindow; + int ShapeEventNumber, ShapeErrorNumber; +! time_t lclock; + struct tm lastTimes, times; + Pixmap border, clip; + GC clearGC, drawGC; +*************** +*** 212,218 **** + XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet); + XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet); + +! XFlush(display, 1); + + /* This call to XPending ensures that if the window gets closed, we die */ + XPending(display); +--- 215,221 ---- + XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet); + XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet); + +! XFlush(display); + + /* This call to XPending ensures that if the window gets closed, we die */ + XPending(display); +*************** +*** 233,243 **** + int + sigalrm() + { +! clock = time(0); +! times = *localtime(&clock); + times.tm_hour = times.tm_hour * 5 + times.tm_min / 12; + reshape(); +! signal(SIGALRM, sigalrm); /* For SysV lusers */ + } + + unsigned long +--- 236,246 ---- + int + sigalrm() + { +! lclock = time(0); +! times = *localtime(&lclock); + times.tm_hour = times.tm_hour * 5 + times.tm_min / 12; + reshape(); +! signal(SIGALRM, (void *)sigalrm); /* For SysV lusers */ + } + + unsigned long +*************** +*** 330,336 **** + display = XOpenDisplay(displayName); + if(display == 0) + { +! fprintf("Couldn't open display %s\n", displayName); + exit(-1); + } + +--- 333,339 ---- + display = XOpenDisplay(displayName); + if(display == 0) + { +! fprintf(stderr, "Couldn't open display %s\n", displayName); + exit(-1); + } + +*************** +*** 347,353 **** + if(access(fn, R_OK) == 0) + XrmMergeDatabases(XrmGetFileDatabase(fn), &db); + +! if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT")) == 0) + XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db); + + XrmMergeDatabases(cmdDB, &db); +--- 350,356 ---- + if(access(fn, R_OK) == 0) + XrmMergeDatabases(XrmGetFileDatabase(fn), &db); + +! if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT"), R_OK) == 0) + XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db); + + XrmMergeDatabases(cmdDB, &db); +*************** +*** 410,416 **** + XMapRaised(display, mainWindow); + XFlush(display); + +! signal(SIGALRM, sigalrm); + new.it_interval.tv_sec = 1; + new.it_value.tv_sec = 1; + new.it_interval.tv_usec = 0; +--- 413,419 ---- + XMapRaised(display, mainWindow); + XFlush(display); + +! signal(SIGALRM, (void *)sigalrm); + new.it_interval.tv_sec = 1; + new.it_value.tv_sec = 1; + new.it_interval.tv_usec = 0; +*************** +*** 420,423 **** + for(;;) + sigpause(0); + } +- +--- 423,425 ---- diff --git a/x11-clocks/tclock/pkg-comment b/x11-clocks/tclock/pkg-comment new file mode 100644 index 000000000000..c696fd6b2f85 --- /dev/null +++ b/x11-clocks/tclock/pkg-comment @@ -0,0 +1 @@ +transparent analog clock for x11 diff --git a/x11-clocks/tclock/pkg-descr b/x11-clocks/tclock/pkg-descr new file mode 100644 index 000000000000..ba0eb387ace8 --- /dev/null +++ b/x11-clocks/tclock/pkg-descr @@ -0,0 +1,2 @@ + + Tclock displays an analog clock with a transparent face. diff --git a/x11-clocks/tclock/pkg-plist b/x11-clocks/tclock/pkg-plist new file mode 100644 index 000000000000..c13d4180b885 --- /dev/null +++ b/x11-clocks/tclock/pkg-plist @@ -0,0 +1 @@ +bin/tclock -- cgit v1.2.3