Add missing file.
Update dependencies. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2332 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
8efe8dcc23
commit
686aea65d4
86
src/fl_images_core.cxx
Normal file
86
src/fl_images_core.cxx
Normal file
@ -0,0 +1,86 @@
|
||||
//
|
||||
// "$Id: fl_images_core.cxx,v 1.1.2.1 2002/06/28 21:19:42 easysw Exp $"
|
||||
//
|
||||
// FLTK images library core.
|
||||
//
|
||||
// Copyright 1997-2002 by Easy Software Products.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||
//
|
||||
// Contents:
|
||||
//
|
||||
// fl_register_images() - Register the image formats.
|
||||
// fl_check_images() - Check for a supported image format.
|
||||
//
|
||||
|
||||
//
|
||||
// Include necessary header files...
|
||||
//
|
||||
|
||||
#include <FL/Fl_Shared_Image.H>
|
||||
#include <FL/Fl_JPEG_Image.H>
|
||||
#include <FL/Fl_PNG_Image.H>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "flstring.h"
|
||||
|
||||
|
||||
//
|
||||
// Define a simple global image registration function that registers
|
||||
// the extra image formats that aren't part of the core FLTK library.
|
||||
//
|
||||
|
||||
static Fl_Image *fl_check_images(const char *name, uchar *header, int headerlen);
|
||||
|
||||
|
||||
//
|
||||
// 'fl_register_images()' - Register the image formats.
|
||||
//
|
||||
|
||||
void fl_register_images() {
|
||||
Fl_Shared_Image::add_handler(fl_check_images);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'fl_check_images()' - Check for a supported image format.
|
||||
//
|
||||
|
||||
Fl_Image * // O - Image, if found
|
||||
fl_check_images(const char *name, // I - Filename
|
||||
uchar *header, // I - Header data from file
|
||||
int headerlen) { // I - Amount of data
|
||||
#ifdef HAVE_LIBPNG
|
||||
if (memcmp(header, "\211PNG", 4) == 0) // PNG header
|
||||
return new Fl_PNG_Image(name);
|
||||
#endif // HAVE_LIBPNG
|
||||
|
||||
#ifdef HAVE_LIBJPEG
|
||||
if (memcmp(header, "\377\330\377", 3) == 0 && // Start-of-Image
|
||||
header[3] >= 0xe0 && header[3] <= 0xef)
|
||||
// APPn
|
||||
return new Fl_JPEG_Image(name);
|
||||
#endif // HAVE_LIBJPEG
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: fl_images_core.cxx,v 1.1.2.1 2002/06/28 21:19:42 easysw Exp $".
|
||||
//
|
@ -103,11 +103,6 @@ Fl_File_Chooser2.o: ../FL/Fl_Image.H ../FL/x.H flstring.h ../config.h
|
||||
Fl_File_Icon.o: flstring.h ../config.h ../FL/Fl_File_Icon.H ../FL/Fl.H
|
||||
Fl_File_Icon.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Widget.H
|
||||
Fl_File_Icon.o: ../FL/fl_draw.H ../FL/filename.H
|
||||
Fl_File_Icon2.o: flstring.h ../config.h ../FL/math.h ../FL/Fl_File_Icon.H
|
||||
Fl_File_Icon2.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_File_Icon2.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H ../FL/x.H
|
||||
Fl_File_Icon2.o: ../FL/Fl_Window.H ../FL/Fl_Widget.H ../FL/fl_draw.H
|
||||
Fl_File_Icon2.o: ../FL/filename.H
|
||||
Fl_File_Input.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_File_Input.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||
Fl_File_Input.o: ../FL/fl_draw.H flstring.h ../config.h
|
||||
@ -140,9 +135,6 @@ Fl_Input.o: flstring.h ../config.h
|
||||
Fl_Input_.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_Input_.o: ../FL/Fl_Input_.H ../FL/Fl_Widget.H ../FL/fl_draw.H
|
||||
Fl_Input_.o: ../FL/fl_ask.H flstring.h ../config.h
|
||||
Fl_JPEG_Image.o: ../FL/Fl_JPEG_Image.H ../FL/Fl_Image.H ../FL/x.H
|
||||
Fl_JPEG_Image.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
|
||||
Fl_JPEG_Image.o: ../config.h
|
||||
Fl_Light_Button.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_Light_Button.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
||||
Fl_Light_Button.o: ../FL/Fl_Widget.H ../FL/fl_draw.H
|
||||
@ -180,9 +172,6 @@ Fl_Pixmap.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_Pixmap.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Widget.H
|
||||
Fl_Pixmap.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Pixmap.H
|
||||
Fl_Pixmap.o: ../FL/Fl_Image.H ../FL/x.H flstring.h ../config.h
|
||||
Fl_PNG_Image.o: ../FL/Fl_PNG_Image.H ../FL/Fl_Image.H ../FL/x.H
|
||||
Fl_PNG_Image.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
|
||||
Fl_PNG_Image.o: ../config.h
|
||||
Fl_PNM_Image.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
Fl_PNM_Image.o: ../FL/Fl_PNM_Image.H ../FL/Fl_Image.H ../FL/x.H
|
||||
Fl_PNM_Image.o: ../FL/Fl_Window.H flstring.h ../config.h
|
||||
|
@ -120,19 +120,21 @@ editor.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/Fl_Text_Buffer.H
|
||||
fast_slow.o: fast_slow.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
fast_slow.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
|
||||
fast_slow.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
|
||||
file_chooser.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||
file_chooser.o: ../FL/Fl_Button.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||
file_chooser.o: ../FL/Fl_Widget.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||
file_chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
|
||||
file_chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Enumerations.H
|
||||
file_chooser.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||
file_chooser.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
|
||||
file_chooser.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
|
||||
file_chooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
|
||||
file_chooser.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
|
||||
file_chooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
|
||||
file_chooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
|
||||
file_chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
|
||||
file_chooser.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
|
||||
file_chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
||||
file_chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Return_Button.H ../FL/fl_ask.H
|
||||
file_chooser.o: ../FL/Fl_File_Icon.H
|
||||
file_chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||
file_chooser.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/Fl_File_Icon.H
|
||||
file_chooser.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H ../FL/x.H
|
||||
file_chooser.o: ../FL/Fl_Window.H ../FL/Fl_PNM_Image.H ../src/flstring.h
|
||||
file_chooser.o: ../config.h
|
||||
fonts.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
|
||||
fonts.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Hold_Browser.H
|
||||
fonts.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
|
||||
|
Loading…
Reference in New Issue
Block a user