summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwcout <wcout@users.noreply.github.com>2023-01-21 17:27:58 +0100
committerGitHub <noreply@github.com>2023-01-21 17:27:58 +0100
commit2ddfd9d9492d9fc1df111ec9211dd1be4d424c35 (patch)
treec766d0dfb3a2d7a75c275db2821d5bcf0e935a15 /test
parent1fc269b0d4c79b256cc57740d318f95dded8c340 (diff)
Animated GIF support (Fl_Anim_GIF_Image class) (#375)
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/Makefile5
-rw-r--r--test/help_dialog.cxx11
-rw-r--r--test/help_dialog.html3
-rw-r--r--test/pixmap.cxx54
-rw-r--r--test/pixmap_browser.cxx19
-rw-r--r--test/pixmaps/animated_fluid_gif.h118
-rw-r--r--test/pixmaps/fltk_animated.gifbin0 -> 116547 bytes
-rw-r--r--test/pixmaps/fltk_animated2.gifbin0 -> 12618 bytes
-rw-r--r--test/pixmaps/fltk_animated3.gifbin0 -> 60554 bytes
-rw-r--r--test/tiled_image.cxx5
-rw-r--r--test/utf8.cxx4
12 files changed, 204 insertions, 17 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index fc8e26ed1..67c36fb00 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -113,7 +113,7 @@ CREATE_EXAMPLE (navigation navigation.cxx fltk)
CREATE_EXAMPLE (output output.cxx fltk)
CREATE_EXAMPLE (overlay overlay.cxx fltk)
CREATE_EXAMPLE (pack pack.cxx fltk)
-CREATE_EXAMPLE (pixmap pixmap.cxx fltk)
+CREATE_EXAMPLE (pixmap pixmap.cxx "fltk_images;fltk")
CREATE_EXAMPLE (pixmap_browser pixmap_browser.cxx "fltk_images;fltk")
CREATE_EXAMPLE (preferences preferences.fl fltk)
CREATE_EXAMPLE (offscreen offscreen.cxx fltk)
diff --git a/test/Makefile b/test/Makefile
index df0aee017..193cd9d17 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -512,7 +512,10 @@ overlay$(EXEEXT): overlay.o
pack$(EXEEXT): pack.o
-pixmap$(EXEEXT): pixmap.o
+pixmap$(EXEEXT): pixmap.o $(IMGLIBNAME)
+ echo Linking $@...
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ pixmap.o $(LINKFLTKIMG) $(LDLIBS)
+ $(OSX_ONLY) ../fltk-config --post $@
pixmap_browser$(EXEEXT): pixmap_browser.o $(IMGLIBNAME)
echo Linking $@...
diff --git a/test/help_dialog.cxx b/test/help_dialog.cxx
index 5970792bb..e87c5e922 100644
--- a/test/help_dialog.cxx
+++ b/test/help_dialog.cxx
@@ -24,9 +24,18 @@
//
#include <FL/Fl_Help_Dialog.H>
+#include <FL/Fl_GIF_Image.H>
#include <FL/filename.H> /* FL_PATH_MAX */
+#include <FL/Fl.H> /* Fl::first_window(), etc */
#include <string.h> /* strcpy(), etc */
+static void cb_refresh(void *d) {
+ // trigger a redraw of the window to see animated GIF's
+ if (Fl::first_window())
+ Fl::first_window()->redraw();
+ Fl::repeat_timeout(1./10, cb_refresh, d);
+}
+
//
// 'main()' - Display the help GUI...
//
@@ -35,6 +44,7 @@ int // O - Exit status
main(int argc, // I - Number of command-line arguments
char *argv[]) // I - Command-line arguments
{
+ Fl_GIF_Image::animate = true; // create animated shared .GIF images
Fl_Help_Dialog *help = new Fl_Help_Dialog;
int i;
if (!Fl::args(argc, argv, i)) Fl::fatal(Fl::help);
@@ -44,6 +54,7 @@ main(int argc, // I - Number of command-line arguments
help->show(1, argv);
+ Fl::add_timeout(1./10, cb_refresh, help); // to animate GIF's
Fl::run();
delete help;
diff --git a/test/help_dialog.html b/test/help_dialog.html
index f7d7fc05a..06492e600 100644
--- a/test/help_dialog.html
+++ b/test/help_dialog.html
@@ -264,6 +264,9 @@ Nested OL/UL:
<TD><IMG SRC="images/tiny.png" alt="Tiny FLTK logo"></TD>
<TD>Tiny FLTK logo.</TD>
</TR><TR>
+ <TD><IMG SRC="pixmaps/fltk_animated.gif" WIDTH="200" HEIGHT="50" alt="Animated FLTK logo"></TD>
+ <TD>Animated FLTK logo.</TD>
+ </TR><TR>
<TD><IMG SRC="images/Fl_Value_Input.png" alt="Fl_Value_Input"></TD>
<TD>This is an image of Fl_Value_Input</TD>
</TR><TR>
diff --git a/test/pixmap.cxx b/test/pixmap.cxx
index c8fb54429..bc08164ea 100644
--- a/test/pixmap.cxx
+++ b/test/pixmap.cxx
@@ -18,17 +18,20 @@
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Pixmap.H>
+#include <FL/Fl_Anim_GIF_Image.H>
#include <stdio.h>
-#include "pixmaps/porsche.xpm"
+#include "pixmaps/animated_fluid_gif.h"
#include <FL/Fl_Toggle_Button.H>
Fl_Toggle_Button *leftb,*rightb,*topb,*bottomb,*insideb,*overb,*inactb;
Fl_Button *b;
Fl_Double_Window *w;
+Fl_Anim_GIF_Image *pixmap;
+Fl_Anim_GIF_Image *depixmap;
-void button_cb(Fl_Widget *,void *) {
+void button_cb(Fl_Widget *wgt,void *) {
int i = 0;
if (leftb->value()) i |= FL_ALIGN_LEFT;
if (rightb->value()) i |= FL_ALIGN_RIGHT;
@@ -42,6 +45,21 @@ void button_cb(Fl_Widget *,void *) {
w->redraw();
}
+void play_cb(Fl_Widget *wgt,void *) {
+ pixmap->start();
+ depixmap->start();
+}
+
+void stop_cb(Fl_Widget *wgt,void *) {
+ pixmap->stop();
+ depixmap->stop();
+}
+
+void step_cb(Fl_Widget *wgt,void *) {
+ pixmap->next();
+ depixmap->next();
+}
+
int dvisual = 0;
int arg(int, char **argv, int &i) {
if (argv[i][1] == '8') {dvisual = 1; i++; return 1;}
@@ -53,18 +71,24 @@ int arg(int, char **argv, int &i) {
int main(int argc, char **argv) {
int i = 1;
if (Fl::args(argc,argv,i,arg) < argc)
- Fl::fatal(" -8 # : use default visual\n%s\n",Fl::help);
+ Fl::fatal(" -8 # : use default visual\n%s\n", Fl::help);
+ if (!dvisual) Fl::visual(FL_RGB);
- Fl_Double_Window window(400,400); ::w = &window;
- Fl_Button b(140,160,120,120,"Pixmap"); ::b = &b;
- Fl_Pixmap *pixmap = new Fl_Pixmap(porsche_xpm);
- Fl_Pixmap *depixmap;
- depixmap = (Fl_Pixmap *)pixmap->copy();
+ Fl_Double_Window window(400,440); ::w = &window;
+ Fl_Button b(130,170,140,140,"Pixmap"); ::b = &b;
+
+ Fl_Anim_GIF_Image::animate = true;
+ pixmap = new Fl_Anim_GIF_Image("fluid", animated_fluid_gif, animated_fluid_gif_size,
+ &b, Fl_Anim_GIF_Image::DONT_RESIZE_CANVAS);
+ pixmap->speed(0.5);
+ b.image(pixmap);
+
+ depixmap = (Fl_Anim_GIF_Image*)pixmap->copy();
depixmap->inactive();
+ b.deimage(depixmap);
// "bind" images to avoid memory leak reports (valgrind, asan)
// note: these reports are benign because they appear at exit, but anyway
-
b.bind_image(pixmap);
b.bind_deimage(depixmap);
@@ -82,7 +106,17 @@ int main(int argc, char **argv) {
overb->callback(button_cb);
inactb = new Fl_Toggle_Button(125,75,100,25,"inactive");
inactb->callback(button_cb);
- if (!dvisual) Fl::visual(FL_RGB);
+
+ Fl_Button* play = new Fl_Button(300, 50, 25, 25, "@>");
+ play->labelcolor(FL_DARK2);
+ play->callback(play_cb);
+ Fl_Button* stop = new Fl_Button(325, 50, 25, 25, "@||");
+ stop->labelcolor(FL_DARK2);
+ stop->callback(stop_cb);
+ Fl_Button* step = new Fl_Button(350, 50, 25, 25, "@|>");
+ step->labelcolor(FL_DARK2);
+ step->callback(step_cb);
+
window.resizable(window);
window.end();
window.show(argc,argv);
diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx
index e9fc1ccf1..dca13316e 100644
--- a/test/pixmap_browser.cxx
+++ b/test/pixmap_browser.cxx
@@ -20,6 +20,7 @@
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Shared_Image.H>
+#include <FL/Fl_GIF_Image.H>
#include <FL/Fl_Printer.H>
#include <string.h>
#include <errno.h>
@@ -36,6 +37,17 @@ Fl_Shared_Image *img;
static char name[1024];
+void cb_forced_redraw(void *) {
+ Fl_Window *win = Fl::first_window();
+ while (win) {
+ if (!win->menu_window())
+ win->redraw();
+ win = Fl::next_window(win);
+ }
+ if (Fl::first_window())
+ Fl::repeat_timeout(1./10, cb_forced_redraw);
+}
+
void load_file(const char *n) {
if (img) {
((Fl_Shared_Image*)b->image())->release();
@@ -118,8 +130,10 @@ void svg_cb(Fl_Widget *widget, void *) {
}
int dvisual = 0;
+int animate = 1;
int arg(int, char **argv, int &i) {
if (argv[i][1] == '8') {dvisual = 1; i++; return 1;}
+ if (argv[i][1] == 'a') {animate = 1; i++; return 1;}
return 0;
}
@@ -131,6 +145,9 @@ int main(int argc, char **argv) {
Fl::args(argc,argv,i,arg);
+ if (animate)
+ Fl_GIF_Image::animate = true; // create animated shared .GIF images (e.g. file chooser)
+
Fl_Double_Window window(400,450); ::w = &window;
Fl_Box b(10,45,380,380); ::b = &b;
b.box(FL_THIN_DOWN_BOX);
@@ -146,5 +163,7 @@ int main(int argc, char **argv) {
svg.callback(svg_cb);
window.show(argc,argv);
+ if (animate)
+ Fl::add_timeout(1./10, cb_forced_redraw); // force periodic redraw
return Fl::run();
}
diff --git a/test/pixmaps/animated_fluid_gif.h b/test/pixmaps/animated_fluid_gif.h
new file mode 100644
index 000000000..19d62b041
--- /dev/null
+++ b/test/pixmaps/animated_fluid_gif.h
@@ -0,0 +1,118 @@
+
+static const size_t animated_fluid_gif_size = 2545;
+static const unsigned char animated_fluid_gif[] =
+{71,73,70,56,57,97,96,0,96,0,132,31,0,0,1,0,3,31,63,46,48,45,0,54,108,78,80,
+77,64,123,116,124,126,123,125,173,98,107,166,116,171,204,63,220,233,19,253,254,
+0,196,218,42,147,189,83,20,101,159,44,112,135,0,88,172,0,96,191,0,109,220,91,
+161,140,68,152,169,38,140,205,0,128,255,15,133,249,45,146,236,47,148,254,108,
+182,255,164,166,162,187,222,255,202,204,201,253,255,252,0,0,0,33,255,11,78,69,
+84,83,67,65,80,69,50,46,48,3,1,0,0,0,33,249,4,5,10,0,31,0,44,0,0,0,0,96,0,96,0,
+0,5,254,224,39,142,100,105,158,104,170,174,108,235,190,112,44,207,116,109,223,
+120,110,2,124,239,3,186,160,238,71,36,14,34,61,161,18,86,244,13,32,78,139,5,201,
+91,90,87,63,143,118,171,201,112,184,25,11,180,122,45,239,120,219,180,135,147,
+241,174,219,223,164,121,46,234,169,211,108,111,87,163,149,211,205,118,119,96,28,
+93,95,28,3,100,127,101,129,130,90,95,107,26,93,22,136,138,128,104,120,28,143,
+90,124,121,97,80,149,139,151,142,109,164,111,134,153,99,160,87,140,155,145,153,
+142,142,113,137,170,66,172,130,108,90,112,126,180,65,182,119,93,163,26,136,64,
+188,181,162,183,112,111,25,169,197,189,199,119,121,143,108,204,205,57,190,120,
+25,124,91,28,187,213,54,215,120,119,221,222,52,224,141,125,179,228,229,207,231,
+105,227,234,49,230,231,239,240,47,242,141,244,245,45,247,130,249,250,88,236,218,
+161,35,246,47,222,179,78,110,196,165,43,184,239,24,194,100,106,252,49,60,193,
+232,33,41,77,3,39,50,17,101,17,226,22,137,26,73,84,36,69,50,225,199,133,33,254,
+81,140,44,233,49,99,74,22,172,186,148,212,230,14,229,203,18,172,44,98,116,121,
+51,133,47,66,26,118,158,36,216,147,98,64,129,32,95,242,83,72,180,40,206,163,
+237,124,56,61,3,245,156,128,164,19,125,16,16,40,104,131,212,169,31,180,114,109,
+100,224,171,83,31,99,149,37,236,64,192,236,77,31,27,198,178,204,48,180,105,72,
+177,92,59,62,242,138,213,155,15,1,105,231,182,217,210,182,111,51,31,29,2,11,78,
+83,216,38,60,196,105,61,8,166,91,211,49,57,31,6,34,171,37,185,147,175,229,195,
+61,0,107,222,108,146,177,219,199,61,226,142,134,228,202,234,105,191,169,87,107,
+246,108,23,52,15,213,178,35,211,86,135,55,183,230,198,181,85,193,245,189,250,
+234,103,58,195,183,93,36,126,174,195,235,74,189,37,179,100,78,246,249,159,208,
+216,88,10,165,238,1,56,45,200,91,38,115,23,100,60,120,168,219,106,196,143,103,
+106,126,73,244,92,139,215,171,41,107,184,134,143,0,24,34,233,143,116,161,191,
+255,11,251,5,40,224,128,4,6,24,128,117,198,0,254,16,128,4,82,52,232,224,131,16,
+70,40,225,132,16,74,128,224,16,61,68,64,225,134,28,118,8,33,21,199,217,215,195,
+0,30,150,104,226,132,99,132,56,67,15,1,104,248,32,6,48,62,120,193,137,52,98,
+192,160,20,7,214,215,16,15,46,54,136,65,3,12,36,160,0,2,20,76,128,0,144,61,122,
+120,65,3,9,84,112,227,139,8,28,144,0,3,10,56,41,133,4,57,182,183,98,15,16,60,88,
+129,2,11,20,48,193,2,11,8,73,38,3,17,60,217,33,2,103,166,9,33,6,19,48,64,166,2,
+110,74,145,162,150,27,241,64,226,131,114,162,201,166,2,14,200,185,64,3,117,118,
+120,193,1,115,66,160,166,131,9,144,153,64,161,98,92,104,15,139,139,82,64,38,2,
+16,68,48,1,5,16,128,25,38,164,28,126,57,36,168,82,92,32,40,166,139,102,137,39,
+76,25,202,40,232,3,105,74,32,65,5,115,58,32,43,141,18,144,42,5,173,11,0,10,42,
+150,58,62,197,67,151,47,38,170,225,140,108,150,169,40,174,183,74,152,172,2,138,
+46,58,133,164,42,254,68,225,96,5,19,52,112,38,2,19,220,216,232,2,168,74,128,65,
+145,7,80,192,32,156,155,58,152,65,5,69,54,43,5,5,9,36,48,193,183,13,44,27,225,
+48,42,10,11,192,158,14,206,235,169,2,65,106,136,129,167,176,86,32,40,153,182,
+90,128,232,160,26,82,224,233,160,79,98,208,232,144,7,23,96,111,132,170,202,224,
+131,180,22,152,74,166,197,178,74,96,105,175,209,122,188,0,154,12,10,58,65,154,
+23,12,76,230,202,231,202,233,235,152,189,218,202,177,20,17,100,105,144,158,18,
+186,188,128,3,246,46,92,47,131,38,31,160,40,175,63,187,233,51,172,82,124,91,64,
+154,52,51,144,233,134,22,246,101,109,132,35,51,96,179,20,130,62,205,32,175,10,
+192,122,65,178,82,19,157,245,212,52,39,144,169,4,218,46,96,244,205,14,226,187,
+234,125,20,38,171,246,141,24,144,249,243,178,81,71,43,232,219,82,180,253,54,6,
+42,47,75,176,174,16,234,204,42,15,27,126,139,64,157,125,223,40,184,162,35,47,0,
+235,141,93,67,109,172,5,35,67,235,238,134,254,146,250,144,100,132,135,75,78,38,
+224,25,148,254,45,180,46,130,237,128,134,223,222,205,182,163,203,194,237,224,
+157,62,177,184,97,222,100,70,219,177,167,94,115,158,168,4,19,120,58,180,20,125,
+71,112,129,167,143,139,203,252,197,29,202,109,20,15,11,110,120,118,235,181,62,
+112,128,5,52,215,27,168,227,16,32,192,224,228,13,60,160,55,200,109,91,94,0,5,38,
+2,59,142,238,28,78,126,35,205,128,54,57,187,219,129,82,208,117,3,221,90,0,252,
+1,7,144,128,167,140,118,36,48,133,13,101,237,59,141,15,136,213,184,143,65,78,
+111,10,40,128,172,210,55,36,1,206,233,81,12,122,24,6,41,152,0,243,205,233,1,159,
+235,16,238,234,48,162,14,185,204,115,13,50,216,201,130,247,165,147,193,12,81,10,
+120,27,131,254,212,128,215,137,75,91,10,168,87,4,26,197,128,203,209,104,18,82,
+185,218,134,120,165,67,7,229,42,86,13,58,34,18,143,232,174,92,133,236,74,76,12,
+89,4,88,246,67,11,232,140,82,20,194,128,147,46,64,51,31,62,232,86,79,122,148,
+226,141,158,104,196,207,49,72,2,51,234,216,25,171,104,129,170,253,32,0,27,146,
+147,248,26,37,59,54,218,241,142,86,36,2,28,41,68,166,6,208,202,87,182,195,163,
+32,39,164,42,234,109,8,1,10,152,82,15,17,55,200,70,74,168,144,10,226,144,3,40,
+96,195,16,58,242,146,247,210,99,135,66,22,72,76,98,18,146,0,128,158,39,71,121,
+34,9,224,238,141,1,72,165,42,87,201,202,86,186,242,149,176,140,165,44,103,201,
+202,31,144,176,9,184,204,165,46,119,201,203,94,246,82,36,190,12,166,48,135,73,
+76,34,76,175,152,200,76,102,49,75,16,2,0,33,249,4,5,10,0,31,0,44,30,0,4,0,38,0,
+57,0,0,5,254,224,39,142,31,96,158,104,170,2,100,235,174,112,236,206,174,103,
+223,56,158,210,60,205,113,185,91,111,152,201,136,56,25,100,50,232,25,246,126,71,
+227,143,233,57,57,121,72,13,105,169,51,93,105,154,204,141,243,225,222,172,95,
+151,70,227,209,126,128,65,116,186,85,92,127,168,115,44,156,218,204,147,236,111,
+100,83,113,94,126,128,69,101,98,132,44,115,124,124,114,126,45,123,57,145,88,102,
+56,149,60,110,153,156,157,158,159,160,161,162,149,142,120,145,165,76,164,168,
+148,167,171,152,173,174,54,170,177,125,126,180,178,176,177,179,76,28,107,26,100,
+163,34,97,69,69,192,162,74,196,197,163,201,201,155,160,204,196,206,159,208,117,
+163,195,204,198,160,200,209,66,161,189,35,147,184,78,183,169,227,228,229,78,189,
+191,231,226,62,208,225,186,154,208,108,231,150,212,240,174,238,247,236,181,36,
+219,201,217,60,253,35,22,80,224,187,96,111,0,130,226,199,176,161,67,90,219,128,
+61,196,49,144,204,68,27,3,139,93,244,144,49,137,175,143,32,67,138,244,149,225,
+130,201,147,38,3,51,132,0,0,33,249,4,5,10,0,31,0,44,34,0,7,0,34,0,54,0,0,5,202,
+224,39,138,94,105,158,168,57,174,236,154,190,104,43,143,112,237,205,179,13,227,
+178,254,242,45,95,10,200,18,198,136,52,163,10,73,82,150,152,77,39,116,74,141,42,
+167,206,39,52,123,171,122,191,224,176,120,76,46,155,207,232,244,151,195,230,156,
+57,154,140,60,227,94,107,52,245,185,190,62,229,232,229,113,127,114,85,129,130,
+134,83,1,126,130,23,134,25,136,138,127,140,135,80,137,141,134,124,76,144,127,
+112,43,28,90,80,154,114,158,30,109,163,93,125,123,58,72,92,75,64,172,39,106,177,
+76,175,63,69,175,112,119,152,46,172,133,162,61,92,161,190,182,89,141,26,65,92,
+197,199,196,134,198,195,78,189,115,186,31,172,193,205,100,112,209,68,144,120,
+102,208,116,180,90,193,25,26,224,93,222,114,229,34,231,25,233,31,25,23,240,241,
+240,119,244,245,246,247,244,33,0,33,249,4,5,10,0,31,0,44,36,0,13,0,26,0,48,0,0,
+5,196,224,39,138,156,102,114,99,170,174,100,230,186,26,43,143,220,107,163,243,
+26,104,182,157,235,188,158,235,167,218,9,135,196,84,77,24,75,166,130,55,167,
+106,153,209,224,164,88,44,103,123,205,150,162,217,207,177,155,164,246,178,208,
+51,54,237,211,30,51,225,177,103,78,247,252,190,175,79,189,46,219,115,57,123,
+124,44,129,132,123,125,133,136,42,0,139,136,137,41,139,0,141,30,93,100,31,144,
+141,102,46,28,1,131,133,98,71,14,157,132,153,47,26,156,41,152,111,149,57,164,
+154,104,76,97,164,171,101,39,78,84,86,97,31,108,25,128,146,83,71,26,146,118,79,
+111,194,42,187,46,198,196,71,202,52,114,190,191,54,193,205,74,38,86,194,216,217,
+218,219,136,102,171,194,178,43,146,173,188,42,227,170,199,214,234,214,25,23,238,
+239,238,112,41,33,0,33,249,4,5,10,0,31,0,44,38,0,5,0,21,0,56,0,0,5,232,224,39,
+142,80,52,158,104,202,101,25,151,190,98,166,105,172,11,167,44,171,125,156,125,
+139,171,26,173,245,27,245,56,195,93,17,185,11,250,96,131,97,203,89,20,205,106,
+181,170,199,99,67,102,127,219,174,231,11,3,132,129,231,159,57,204,217,186,223,
+111,145,185,7,175,199,81,109,207,76,249,91,105,182,82,79,48,109,121,71,85,64,68,
+135,39,52,127,112,76,26,130,136,132,133,57,58,47,121,34,92,149,57,28,1,153,118,
+122,155,57,3,159,118,82,155,164,31,160,161,162,25,169,171,65,155,26,175,171,167,
+53,158,170,171,154,58,79,186,160,138,192,193,194,39,190,118,55,73,160,0,0,120,
+162,121,111,2,56,173,117,27,203,70,173,45,117,204,173,206,110,218,205,198,39,
+215,191,39,177,156,197,110,73,96,231,235,117,71,189,190,167,124,240,162,74,186,
+229,149,46,246,215,249,176,251,185,160,247,56,85,177,37,67,81,188,17,231,220,17,
+99,199,176,225,186,61,16,35,74,220,19,2,0,59};
+
diff --git a/test/pixmaps/fltk_animated.gif b/test/pixmaps/fltk_animated.gif
new file mode 100644
index 000000000..bff543a05
--- /dev/null
+++ b/test/pixmaps/fltk_animated.gif
Binary files differ
diff --git a/test/pixmaps/fltk_animated2.gif b/test/pixmaps/fltk_animated2.gif
new file mode 100644
index 000000000..52b8a8359
--- /dev/null
+++ b/test/pixmaps/fltk_animated2.gif
Binary files differ
diff --git a/test/pixmaps/fltk_animated3.gif b/test/pixmaps/fltk_animated3.gif
new file mode 100644
index 000000000..8656c4d6a
--- /dev/null
+++ b/test/pixmaps/fltk_animated3.gif
Binary files differ
diff --git a/test/tiled_image.cxx b/test/tiled_image.cxx
index 54e404307..4b313827d 100644
--- a/test/tiled_image.cxx
+++ b/test/tiled_image.cxx
@@ -47,11 +47,10 @@ int arg(int argc, char **argv, int &i) {
}
int main(int argc, char **argv) {
-#ifdef FLTK_USE_X11
int i = 1;
-
Fl::args(argc,argv,i,arg);
-
+
+#ifdef FLTK_USE_X11
if (visid >= 0) {
fl_open_display();
XVisualInfo templt; int num;
diff --git a/test/utf8.cxx b/test/utf8.cxx
index 2f2d928a1..8cd8763eb 100644
--- a/test/utf8.cxx
+++ b/test/utf8.cxx
@@ -609,7 +609,7 @@ int main(int argc, char** argv)
end_list /= 16;
}
argc = 1;
- for (long y = off; y < end_list; y++) {
+ for (int y = off; y < end_list; y++) {
int o = 0;
char bu[25]; // index label
char buf[16 * 6]; // utf8 text
@@ -622,7 +622,7 @@ int main(int argc, char** argv)
i++;
}
buf[o] = '\0';
- snprintf(bu, sizeof(bu), "0x%06lX", y * 16);
+ snprintf(bu, sizeof(bu), "0x%06X", y * 16);
Fl_Input *b = new Fl_Input(200,(y-off)*25,80,25);
b->textfont(FL_COURIER);
b->value(fl_strdup(bu));