aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-03-24 15:45:55 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-03-24 15:45:55 +0000
commitb8b37f87278897ddd867505b93b72883f99f2148 (patch)
tree79db04ceadecaedad015291e49dc8ce784b79ff2
parent[w3m-dev 03828] possible typo in nextA (diff)
downloadw3m-b8b37f87278897ddd867505b93b72883f99f2148.tar.gz
w3m-b8b37f87278897ddd867505b93b72883f99f2148.zip
[w3m-dev 03829] w3mimgdisplay -anim
* w3mimgdisplay.c (maxAnim): added, default 100 (main): add --anim option, w_op->max_anim * w3mimg/w3mimg.h (w3mimg_op): add max_anim * w3mimg/fb/fb_gdkpixbuf.c (fb_image_load): add max_anim * w3mimg/fb/fb_img.h (fb_image_load): add max_anim args * w3mimg/fb/fb_imlib2.c (fb_image_load): add max_anim args * w3mimg/fb/fb_w3mimg.c (w3mfb_load_image): pass max_anim * w3mimg/x11/x11_w3mimg.c (x11_load_image): max_anim From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog14
-rw-r--r--w3mimg/fb/fb_gdkpixbuf.c7
-rw-r--r--w3mimg/fb/fb_img.h4
-rw-r--r--w3mimg/fb/fb_imlib2.c4
-rw-r--r--w3mimg/fb/fb_w3mimg.c4
-rw-r--r--w3mimg/w3mimg.h3
-rw-r--r--w3mimg/x11/x11_w3mimg.c6
-rw-r--r--w3mimgdisplay.c10
8 files changed, 39 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ee53f7b..d519914 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-03-25 Hiroyuki Ito <hito@crl.go.jp>
+
+ * [w3m-dev 03829] w3mimgdisplay -anim
+ * w3mimgdisplay.c (maxAnim): added, default 100
+ (main): add --anim option, w_op->max_anim
+ * w3mimg/w3mimg.h (w3mimg_op): add max_anim
+ * w3mimg/fb/fb_gdkpixbuf.c (fb_image_load): add max_anim
+ * w3mimg/fb/fb_img.h (fb_image_load): add max_anim args
+ * w3mimg/fb/fb_imlib2.c (fb_image_load): add max_anim args
+ * w3mimg/fb/fb_w3mimg.c (w3mfb_load_image): pass max_anim
+ * w3mimg/x11/x11_w3mimg.c (x11_load_image): max_anim
+
2003-03-24 Daiki Ueno <ueno@unixuser.org>
* [w3m-dev 03828] possible typo in nextA
@@ -7568,4 +7580,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.800 2003/03/23 15:21:01 ukai Exp $
+$Id: ChangeLog,v 1.801 2003/03/24 15:45:55 ukai Exp $
diff --git a/w3mimg/fb/fb_gdkpixbuf.c b/w3mimg/fb/fb_gdkpixbuf.c
index 45fabd7..e0c1775 100644
--- a/w3mimg/fb/fb_gdkpixbuf.c
+++ b/w3mimg/fb/fb_gdkpixbuf.c
@@ -1,4 +1,4 @@
-/* $Id: fb_gdkpixbuf.c,v 1.8 2002/09/09 14:00:18 ukai Exp $ */
+/* $Id: fb_gdkpixbuf.c,v 1.9 2003/03/24 15:45:59 ukai Exp $ */
/**************************************************************************
fb_gdkpixbuf.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
@@ -27,7 +27,7 @@ get_image_size(char *filename, int *w, int *h)
}
FB_IMAGE **
-fb_image_load(char *filename, int w, int h)
+fb_image_load(char *filename, int w, int h, int max_anim)
{
GdkPixbufAnimation *animation;
GList *frames;
@@ -44,6 +44,9 @@ fb_image_load(char *filename, int w, int h)
fw = gdk_pixbuf_animation_get_width(animation);
fh = gdk_pixbuf_animation_get_height(animation);
n = gdk_pixbuf_animation_get_num_frames(animation);
+ if (max_anim > 0) {
+ n = (max_anim > n)? n : max_anim;
+ }
if (w < 1 || h < 1) {
w = fw;
h = fh;
diff --git a/w3mimg/fb/fb_img.h b/w3mimg/fb/fb_img.h
index 2e64717..f607bde 100644
--- a/w3mimg/fb/fb_img.h
+++ b/w3mimg/fb/fb_img.h
@@ -1,9 +1,9 @@
-/* $Id: fb_img.h,v 1.6 2002/10/10 16:16:04 ukai Exp $ */
+/* $Id: fb_img.h,v 1.7 2003/03/24 15:45:59 ukai Exp $ */
#ifndef fb_img_header
#define fb_img_header
#include "fb.h"
-FB_IMAGE **fb_image_load(char *filename, int w, int h);
+FB_IMAGE **fb_image_load(char *filename, int w, int h, int n);
void fb_image_set_bg(int r, int g, int b);
int get_image_size(char *filename, int *w, int *h);
diff --git a/w3mimg/fb/fb_imlib2.c b/w3mimg/fb/fb_imlib2.c
index 49a17a5..972f06e 100644
--- a/w3mimg/fb/fb_imlib2.c
+++ b/w3mimg/fb/fb_imlib2.c
@@ -1,4 +1,4 @@
-/* $Id: fb_imlib2.c,v 1.8 2002/09/09 14:00:42 ukai Exp $ */
+/* $Id: fb_imlib2.c,v 1.9 2003/03/24 15:45:59 ukai Exp $ */
/**************************************************************************
fb_imlib2.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
@@ -32,7 +32,7 @@ get_image_size(char *filename, int *w, int *h)
}
FB_IMAGE **
-fb_image_load(char *filename, int w, int h)
+fb_image_load(char *filename, int w, int h, int n)
{
Imlib_Image image;
FB_IMAGE **frame;
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c
index e7cb1eb..bac9dcc 100644
--- a/w3mimg/fb/fb_w3mimg.c
+++ b/w3mimg/fb/fb_w3mimg.c
@@ -1,4 +1,4 @@
-/* $Id: fb_w3mimg.c,v 1.8 2002/12/25 16:18:19 ukai Exp $ */
+/* $Id: fb_w3mimg.c,v 1.9 2003/03/24 15:46:00 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -67,7 +67,7 @@ w3mfb_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
if (self == NULL)
return 0;
- im = fb_image_load(fname, w, h);
+ im = fb_image_load(fname, w, h, self->max_anim);
if (!im)
return 0;
img->pixmap = im;
diff --git a/w3mimg/w3mimg.h b/w3mimg/w3mimg.h
index 639d41c..0e7bc26 100644
--- a/w3mimg/w3mimg.h
+++ b/w3mimg/w3mimg.h
@@ -1,4 +1,4 @@
-/* $Id: w3mimg.h,v 1.5 2002/09/09 13:59:24 ukai Exp $ */
+/* $Id: w3mimg.h,v 1.6 2003/03/24 15:45:58 ukai Exp $ */
#include "config.h"
#ifdef USE_W3MIMG_FB
@@ -16,6 +16,7 @@ typedef struct _w3mimg_op {
void *priv; /* driver specific data */
int width, height; /* window width, height */
int offset_x, offset_y; /* offset */
+ int max_anim;
int (*init) (struct _w3mimg_op * self);
int (*finish) (struct _w3mimg_op * self);
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c
index b2d928d..0be4cfe 100644
--- a/w3mimg/x11/x11_w3mimg.c
+++ b/w3mimg/x11/x11_w3mimg.c
@@ -1,4 +1,4 @@
-/* $Id: x11_w3mimg.c,v 1.12 2003/01/21 15:38:59 ukai Exp $ */
+/* $Id: x11_w3mimg.c,v 1.13 2003/03/24 15:46:00 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -294,6 +294,10 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
iw = gdk_pixbuf_animation_get_width(animation);
ih = gdk_pixbuf_animation_get_height(animation);
+ if (self->max_anim > 0) {
+ n = (self->max_anim > n)? n : self->max_anim;
+ }
+
if (w < 1 || h < 1) {
w = iw;
h = ih;
diff --git a/w3mimgdisplay.c b/w3mimgdisplay.c
index 4f48441..4534246 100644
--- a/w3mimgdisplay.c
+++ b/w3mimgdisplay.c
@@ -1,4 +1,4 @@
-/* $Id: w3mimgdisplay.c,v 1.12 2003/01/17 16:57:21 ukai Exp $ */
+/* $Id: w3mimgdisplay.c,v 1.13 2003/03/24 15:45:57 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -17,7 +17,7 @@ static char *defined_size = NULL;
#define MAX_IMAGE 1000
static W3MImage *imageBuf = NULL;
-static int maxImage = 0;
+static int maxImage = 0, maxAnim = 100;
static void GetOption(int argc, char **argv);
static void DrawImage(char *buf, int redraw);
@@ -57,6 +57,7 @@ main(int argc, char **argv)
w_op->offset_x = offset_x;
if (defined_y)
w_op->offset_y = offset_y;
+ w_op->max_anim = maxAnim;
if (defined_test) {
printf("%d %d\n", w_op->width - w_op->offset_x,
@@ -177,6 +178,11 @@ GetOption(int argc, char **argv)
else if (!strcmp("-test", argv[i])) {
defined_test = 1;
}
+ else if (!strcmp("-anim", argv[i])) {
+ if (++i >= argc)
+ exit(1);
+ maxAnim = atoi(argv[i]);
+ }
else if (!strcmp("-size", argv[i])) {
if (++i >= argc)
exit(1);