minor changes to make FLTK compile as a DLL in CodeWarrior

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2521 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2002-07-11 22:43:53 +00:00
parent cd9ae1abd5
commit 319c89ab3c
5 changed files with 29 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/*
* "$Id: Fl_Export.H,v 1.3.2.3 2002/05/03 20:30:19 easysw Exp $"
* "$Id: Fl_Export.H,v 1.3.2.4 2002/07/11 22:43:52 matthiaswm Exp $"
*
* WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK).
*
@ -27,10 +27,11 @@
# define Fl_Export_H
/*
* The following is only used when building DLLs under WIN32 with Visual C++...
* The following is only used when building DLLs under WIN32 with Visual C++
* or CodeWarrior...
*/
# if defined(FL_DLL) && defined(_MSC_VER)
# if defined(FL_DLL) && ( defined(_MSC_VER) || defined(__MWERKS__) )
# ifdef FL_LIBRARY
# define FL_EXPORT __declspec(dllexport)
# else
@ -38,10 +39,10 @@
# endif /* FL_LIBRARY */
# else
# define FL_EXPORT
# endif /* FL_DLL && _MSC_VER */
# endif /* FL_DLL && ( _MSC_VER || __MWERKS__ ) */
#endif /* !Fl_Export_H */
/*
* End of "$Id: Fl_Export.H,v 1.3.2.3 2002/05/03 20:30:19 easysw Exp $".
* End of "$Id: Fl_Export.H,v 1.3.2.4 2002/07/11 22:43:52 matthiaswm Exp $".
*/

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Group.H,v 1.6.2.4.2.2 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Group.H,v 1.6.2.4.2.3 2002/07/11 22:43:52 matthiaswm Exp $"
//
// Group header file for the Fast Light Tool Kit (FLTK).
//
@ -52,8 +52,13 @@ protected:
public:
FL_EXPORT int handle(int);
#ifdef __MWERKS__
FL_EXPORT void begin();
FL_EXPORT void end();
#else
void begin() {current_ = this;}
void end() {current_ = (Fl_Group*)parent();}
#endif
static Fl_Group *current() {return current_;}
static void current(Fl_Group *g) {current_ = g;}
@ -96,5 +101,5 @@ public:
#endif
//
// End of "$Id: Fl_Group.H,v 1.6.2.4.2.2 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Group.H,v 1.6.2.4.2.3 2002/07/11 22:43:52 matthiaswm Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.14 2002/05/13 05:05:11 spitzak Exp $"
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.15 2002/07/11 22:43:52 matthiaswm Exp $"
//
// Group widget for the Fast Light Tool Kit (FLTK).
//
@ -49,6 +49,12 @@ int Fl_Group::find(const Fl_Widget* o) const {
return i;
}
// Kludge: Metrowerks CodeWarrior can't export static class member: current_
#ifdef __MWERKS__
void Fl_Group::begin() {current_ = this;}
void Fl_Group::end() {current_ = (Fl_Group*)parent();}
#endif
extern Fl_Widget* fl_oldfocus; // set by Fl::focus
// For back-compatability, we must adjust all events sent to child
@ -580,5 +586,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
}
//
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.14 2002/05/13 05:05:11 spitzak Exp $".
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.15 2002/07/11 22:43:52 matthiaswm Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: cube.cxx,v 1.4.2.5.2.4 2002/07/11 01:10:15 matthiaswm Exp $"
// "$Id: cube.cxx,v 1.4.2.5.2.5 2002/07/11 22:43:53 matthiaswm Exp $"
//
// Another forms test program for the Fast Light Tool Kit (FLTK).
//
@ -33,7 +33,6 @@
#include <FL/Fl_Radio_Light_Button.H>
#include <FL/Fl_Slider.H>
#include <stdlib.h>
#include <stdio.h>
#if !HAVE_GL
class cube_box : public Fl_Box {
@ -185,5 +184,5 @@ int main(int argc, char **argv) {
}
//
// End of "$Id: cube.cxx,v 1.4.2.5.2.4 2002/07/11 01:10:15 matthiaswm Exp $".
// End of "$Id: cube.cxx,v 1.4.2.5.2.5 2002/07/11 22:43:53 matthiaswm Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: editor.cxx,v 1.2.2.3.2.11 2002/06/29 00:10:05 matthiaswm Exp $"
// "$Id: editor.cxx,v 1.2.2.3.2.12 2002/07/11 22:43:53 matthiaswm Exp $"
//
// A simple text editor program for the Fast Light Tool Kit (FLTK).
//
@ -35,6 +35,10 @@
#include <ctype.h>
#include <errno.h>
#ifdef __MWERKS__
# define FL_DLL
#endif
#include <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Double_Window.H>
@ -758,5 +762,5 @@ int main(int argc, char **argv) {
}
//
// End of "$Id: editor.cxx,v 1.2.2.3.2.11 2002/06/29 00:10:05 matthiaswm Exp $".
// End of "$Id: editor.cxx,v 1.2.2.3.2.12 2002/07/11 22:43:53 matthiaswm Exp $".
//