diff options
author | vs <vs@FreeBSD.org> | 2004-11-30 18:10:48 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2004-11-30 18:10:48 +0800 |
commit | 696de20c177698e595e4fc8229c0005702b15659 (patch) | |
tree | 3423b4bb503e7f78fe28d8bb9b53e7ac474d57fa /x11-clocks/osdclock/files | |
parent | a22c22eb180b0a9d592022ea75ee8083e3082191 (diff) | |
download | freebsd-ports-gnome-696de20c177698e595e4fc8229c0005702b15659.tar.gz freebsd-ports-gnome-696de20c177698e595e4fc8229c0005702b15659.tar.zst freebsd-ports-gnome-696de20c177698e595e4fc8229c0005702b15659.zip |
Add osdclock 0.5, small clock which uses libxosd to render text to the
root window.
PR: ports/70061
Submitted by: Roman Bogorodskiy <bogorodskiy@inbox.ru>
Diffstat (limited to 'x11-clocks/osdclock/files')
-rw-r--r-- | x11-clocks/osdclock/files/patch-osd_clock.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/x11-clocks/osdclock/files/patch-osd_clock.c b/x11-clocks/osdclock/files/patch-osd_clock.c new file mode 100644 index 000000000000..05c1b61cd291 --- /dev/null +++ b/x11-clocks/osdclock/files/patch-osd_clock.c @@ -0,0 +1,34 @@ +--- osd_clock.c.orig Thu Mar 29 19:10:24 2001 ++++ osd_clock.c Fri Aug 6 08:05:45 2004 +@@ -109,7 +109,15 @@ + } + } + +- osd = xosd_init (font, color, delay, pos, offset, shadow); ++ osd = xosd_create(1); ++ ++ xosd_set_font(osd, font); ++ xosd_set_colour(osd, color); ++ xosd_set_timeout(osd, delay); ++ xosd_set_pos(osd, pos); ++ xosd_set_vertical_offset(osd, offset); ++ xosd_set_shadow_offset(osd, shadow); ++ + if (!osd) + { + fprintf (stderr, "Error initializing osd\n"); +@@ -127,11 +135,12 @@ + output = malloc(255 * sizeof(char)); + strftime(output, 255, format, localtime(&curr_time)); + +- xosd_display (osd, 1, XOSD_string, output); ++ if ((xosd_display (osd, 0, XOSD_string, output)) == -1) ++ (void)fprintf(stderr, "xosd_display() failed\n"); + sleep(interval); + } + +- xosd_uninit (osd); ++ xosd_destroy (osd); + + return EXIT_SUCCESS; + } |