mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Update Fl_Image and friends so that we don't need to include the
system headers (which unfortunately are not too friendly with other code...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2893 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+8
-4
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.8 2002/08/05 17:50:22 easysw Exp $"
|
||||
// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.9 2003/01/10 19:29:07 easysw Exp $"
|
||||
//
|
||||
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -35,8 +35,12 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
|
||||
|
||||
const uchar *array;
|
||||
int alloc_array; // Non-zero if data was allocated
|
||||
Fl_Bitmask id; // for internal use
|
||||
|
||||
#ifdef __APPLE__
|
||||
void *id; // for internal use
|
||||
#else
|
||||
unsigned id; // for internal use
|
||||
#endif // __APPLE__
|
||||
|
||||
Fl_Bitmap(const uchar *bits, int W, int H) :
|
||||
Fl_Image(W,H,0), array(bits), alloc_array(0), id(0) {data((const char **)&array, 1);}
|
||||
Fl_Bitmap(const char *bits, int W, int H) :
|
||||
@@ -54,5 +58,5 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.8 2002/08/05 17:50:22 easysw Exp $".
|
||||
// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.9 2003/01/10 19:29:07 easysw Exp $".
|
||||
//
|
||||
|
||||
+10
-6
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Image.H,v 1.5.2.3.2.16 2002/10/11 14:17:20 easysw Exp $"
|
||||
// "$Id: Fl_Image.H,v 1.5.2.3.2.17 2003/01/10 19:29:07 easysw Exp $"
|
||||
//
|
||||
// Image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -26,10 +26,9 @@
|
||||
#ifndef Fl_Image_H
|
||||
# define Fl_Image_H
|
||||
|
||||
# include "x.H"
|
||||
|
||||
class Fl_Widget;
|
||||
struct Fl_Menu_Item;
|
||||
struct Fl_Label;
|
||||
|
||||
class FL_EXPORT Fl_Image {
|
||||
int w_, h_, d_, ld_, count_;
|
||||
@@ -80,8 +79,13 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
|
||||
const uchar *array;
|
||||
int alloc_array; // Non-zero if array was allocated
|
||||
|
||||
Fl_Offscreen id; // for internal use
|
||||
Fl_Bitmask mask; // for internal use (mask bitmap)
|
||||
#ifdef __APPLE__
|
||||
void *id; // for internal use
|
||||
void *mask; // for internal use (mask bitmap)
|
||||
#else
|
||||
unsigned id; // for internal use
|
||||
unsigned mask; // for internal use (mask bitmap)
|
||||
#endif //
|
||||
|
||||
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
|
||||
Fl_Image(W,H,D), array(bits), alloc_array(0), id(0), mask(0) {data((const char **)&array, 1); ld(LD);}
|
||||
@@ -100,5 +104,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
|
||||
#endif // !Fl_Image_H
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Image.H,v 1.5.2.3.2.16 2002/10/11 14:17:20 easysw Exp $".
|
||||
// End of "$Id: Fl_Image.H,v 1.5.2.3.2.17 2003/01/10 19:29:07 easysw Exp $".
|
||||
//
|
||||
|
||||
+10
-5
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.9 2002/08/09 01:09:48 easysw Exp $"
|
||||
// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.10 2003/01/10 19:29:08 easysw Exp $"
|
||||
//
|
||||
// Pixmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -47,9 +47,14 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
||||
public:
|
||||
|
||||
int alloc_data; // Non-zero if data was allocated
|
||||
Fl_Offscreen id; // for internal use
|
||||
Fl_Bitmask mask; // for internal use (mask bitmap)
|
||||
|
||||
#ifdef __APPLE__
|
||||
void *id; // for internal use
|
||||
void *mask; // for internal use (mask bitmap)
|
||||
#else
|
||||
unsigned id; // for internal use
|
||||
unsigned mask; // for internal use (mask bitmap)
|
||||
#endif // __APPLE__
|
||||
|
||||
explicit Fl_Pixmap(char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
|
||||
explicit Fl_Pixmap(uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
|
||||
explicit Fl_Pixmap(const char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
|
||||
@@ -69,5 +74,5 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.9 2002/08/09 01:09:48 easysw Exp $".
|
||||
// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.10 2003/01/10 19:29:08 easysw Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user