aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--w3mimg/fb/fb_w3mimg.c6
-rw-r--r--w3mimg/x11/x11_w3mimg.c14
3 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 552e732..4205b57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-03-27 ABE Yuji <cbo46560@pop12.odn.ne.jp>
+
+ * [w3m-dev 03833] gif animation with no delay_time
+ * w3mimg/fb/fb_w3mimg.c (w3mfb_show_image): skip delay<=0
+ * w3mimg/x11/x11_w3mimg.c (x11_image): add delay
+ (x11_img_new): initialize delay
+ (x11_load_image): initialize delay
+ (x11_show_image): jump to last image if delay<=0
+
2003-03-27 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 03831] fix typo
@@ -7596,4 +7605,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.803 2003/03/26 15:19:35 ukai Exp $
+$Id: ChangeLog,v 1.804 2003/03/26 15:34:12 ukai Exp $
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c
index bac9dcc..d6c4cfa 100644
--- a/w3mimg/fb/fb_w3mimg.c
+++ b/w3mimg/fb/fb_w3mimg.c
@@ -1,4 +1,4 @@
-/* $Id: fb_w3mimg.c,v 1.9 2003/03/24 15:46:00 ukai Exp $ */
+/* $Id: fb_w3mimg.c,v 1.10 2003/03/26 15:34:19 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -92,6 +92,10 @@ w3mfb_show_image(w3mimg_op * self, W3MImage * img, int sx, int sy,
frame = (FB_IMAGE **) img->pixmap;
i = frame[0]->id;
+ while (i < frame[0]->num - 1 && frame[i]->delay <= 0) {
+ frame[0]->id += 1;
+ i = frame[0]->id;
+ }
fb_image_draw(frame[i],
x + self->offset_x, y + self->offset_y,
sx, sy, (sw ? sw : img->width), (sh ? sh : img->height));
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c
index b70ce90..14b9437 100644
--- a/w3mimg/x11/x11_w3mimg.c
+++ b/w3mimg/x11/x11_w3mimg.c
@@ -1,4 +1,4 @@
-/* $Id: x11_w3mimg.c,v 1.15 2003/03/26 15:14:23 ukai Exp $ */
+/* $Id: x11_w3mimg.c,v 1.16 2003/03/26 15:34:20 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -38,6 +38,7 @@ struct x11_image {
int total;
int no;
int wait;
+ int delay;
Pixmap *pixmap;
};
@@ -215,6 +216,7 @@ x11_img_new(struct x11_info *xi, int w, int h, int n)
img->no = 0;
img->total = n;
img->wait = 0;
+ img->delay = -1;
return img;
ERROR:
@@ -342,12 +344,13 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
for (i = 0; i < n; i++) {
GdkPixbufFrame *frame;
GdkPixbuf *org_pixbuf, *pixbuf;
- int width, height, ofstx, ofsty;
+ int width, height, ofstx, ofsty, delay;
frame = (GdkPixbufFrame *) g_list_nth_data(frames, i);
org_pixbuf = gdk_pixbuf_frame_get_pixbuf(frame);
ofstx = gdk_pixbuf_frame_get_x_offset(frame);
ofsty = gdk_pixbuf_frame_get_y_offset(frame);
+ delay = gdk_pixbuf_frame_get_delay_time(frame);
width = gdk_pixbuf_get_width(org_pixbuf);
height = gdk_pixbuf_get_height(org_pixbuf);
@@ -363,6 +366,8 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
width = gdk_pixbuf_get_width(pixbuf);
height = gdk_pixbuf_get_height(pixbuf);
+ if (delay >= 0) ximg->delay = delay;
+
if (i > 0) {
switch (action) {
case GDK_PIXBUF_FRAME_RETAIN:
@@ -428,7 +433,10 @@ x11_show_image(w3mimg_op * self, W3MImage * img, int sx, int sy, int sw,
(sh ? sh : img->height), x + self->offset_x, y + self->offset_y);
#elif defined(USE_GDKPIXBUF)
#define WAIT_CNT 4
- i = ximg->no;
+ if (ximg->delay <= 0)
+ i = ximg->total - 1;
+ else
+ i = ximg->no;
XCopyArea(xi->display, ximg->pixmap[i], xi->window, xi->imageGC,
sx, sy,
(sw ? sw : img->width),