summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1999-02-16 22:00:04 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1999-02-16 22:00:04 +0000
commitca41e69c27af0dee60b8186d06f5be0713d1a051 (patch)
tree85fd248b68d4d00414fef6488016da975f739bd2 /src
parent18312d3c1fb325c0d9ac92e98137cebbcadb563c (diff)
Updated headers to support WIN32 and OS/2 DLLs.
Updated VC++ project files. Removed dummymain.c (no longer needed). git-svn-id: file:///fltk/svn/fltk/trunk@278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Font.H18
-rw-r--r--src/Fl_XColor.H10
-rw-r--r--src/Fl_win32.cxx29
-rw-r--r--src/dummymain.c33
4 files changed, 31 insertions, 59 deletions
diff --git a/src/Fl_Font.H b/src/Fl_Font.H
index f5509bfc9..bbe96a0c6 100644
--- a/src/Fl_Font.H
+++ b/src/Fl_Font.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Font.H,v 1.5 1999/01/07 19:17:19 mike Exp $"
+// "$Id: Fl_Font.H,v 1.6 1999/02/16 21:59:50 mike Exp $"
//
// Font definitions for the Fast Light Tool Kit (FLTK).
//
@@ -41,22 +41,22 @@ public:
Fl_FontSize *next; // linked list for this Fl_Fontdesc
#ifndef WIN32
XFontStruct* font; // X font information
- Fl_FontSize(const char* xfontname);
+ FL_EXPORT Fl_FontSize(const char* xfontname);
#else
HFONT fid;
int width[256];
TEXTMETRIC metr;
- Fl_FontSize(const char* fontname, int size);
+ FL_EXPORT Fl_FontSize(const char* fontname, int size);
#endif
int minsize; // smallest point size that should use this
int maxsize; // largest point size that should use this
#if HAVE_GL
unsigned int listbase;// base of display list, 0 = none
#endif
- ~Fl_FontSize();
+ FL_EXPORT ~Fl_FontSize();
};
-extern Fl_FontSize *fl_fontsize; // the currently selected one
+extern FL_EXPORT Fl_FontSize *fl_fontsize; // the currently selected one
struct Fl_Fontdesc {
const char *name;
@@ -67,16 +67,16 @@ struct Fl_Fontdesc {
#endif
};
-extern Fl_Fontdesc *fl_fonts; // the table
+extern FL_EXPORT Fl_Fontdesc *fl_fonts; // the table
#ifndef WIN32
// functions for parsing X font names:
-const char* fl_font_word(const char *p, int n);
-char *fl_find_fontsize(char *name);
+FL_EXPORT const char* fl_font_word(const char *p, int n);
+FL_EXPORT char *fl_find_fontsize(char *name);
#endif
#endif
//
-// End of "$Id: Fl_Font.H,v 1.5 1999/01/07 19:17:19 mike Exp $".
+// End of "$Id: Fl_Font.H,v 1.6 1999/02/16 21:59:50 mike Exp $".
//
diff --git a/src/Fl_XColor.H b/src/Fl_XColor.H
index 4caf6fc87..ba3c041d2 100644
--- a/src/Fl_XColor.H
+++ b/src/Fl_XColor.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_XColor.H,v 1.4 1999/01/07 19:17:30 mike Exp $"
+// "$Id: Fl_XColor.H,v 1.5 1999/02/16 21:59:51 mike Exp $"
//
// X-specific color definitions for the Fast Light Tool Kit (FLTK).
//
@@ -32,12 +32,12 @@ struct Fl_XColor {
unsigned char mapped; // true when XAllocColor done
unsigned long pixel; // the X pixel to use
};
-extern Fl_XColor fl_xmap[/*overlay*/][256];
+extern FL_EXPORT Fl_XColor fl_xmap[/*overlay*/][256];
// mask & shifts to produce xcolor for truecolor visuals:
-extern unsigned char fl_redmask, fl_greenmask, fl_bluemask;
-extern int fl_redshift, fl_greenshift, fl_blueshift, fl_extrashift;
+extern FL_EXPORT unsigned char fl_redmask, fl_greenmask, fl_bluemask;
+extern FL_EXPORT int fl_redshift, fl_greenshift, fl_blueshift, fl_extrashift;
//
-// End of "$Id: Fl_XColor.H,v 1.4 1999/01/07 19:17:30 mike Exp $".
+// End of "$Id: Fl_XColor.H,v 1.5 1999/02/16 21:59:51 mike Exp $".
//
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index aa1dee28f..f79112a4a 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.27 1999/02/03 08:43:33 bill Exp $"
+// "$Id: Fl_win32.cxx,v 1.28 1999/02/16 21:59:51 mike Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -106,7 +106,6 @@ double fl_wait(int timeout_flag, double time) {
int have_message;
timeval t;
fd_set fdt[3];
- int n;
// For WIN32 we need to poll for socket input FIRST, since
@@ -700,14 +699,6 @@ Fl_X* Fl_X::make(Fl_Window* w) {
HINSTANCE fl_display = 0;
-extern "C" {
-extern int __argc;
-extern char **__argv;
-extern int main(int argc, char *argv[]);
-extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
- LPSTR lpCmdLine, int nCmdShow);
-}
-
//
// This WinMain() function can be overridden by an application and
// is provided for compatibility with programs written for other
@@ -715,6 +706,11 @@ extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
// "main()". This will allow you to build a WIN32 Application
// without any special settings.
//
+// Because of problems with the Microsoft Visual C++ header files
+// and/or compiler, you cannot have a WinMain function in a DLL.
+// I don't know why. Thus, this nifty feature is only available
+// if you link to the static library.
+//
// Currently the debug version of this library will create a
// console window for your application so you can put printf()
// statements for debugging or informational purposes. Ultimately
@@ -723,8 +719,15 @@ extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
// Microsoft(r) Windows(r) that allows for it.
//
+#ifndef FL_DLL
+extern "C" {
+extern int __argc;
+extern char **__argv;
+extern FL_EXPORT int main(int argc, char *argv[]);
+};
+
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
- LPSTR lpCmdLine, int nCmdShow) {
+ LPSTR lpCmdLine, int nCmdShow) {
// Save the current instance in the fl_display variable...
fl_display = hInstance;
@@ -747,6 +750,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
return main(__argc, __argv);
}
+#endif /* !FL_DLL */
+
////////////////////////////////////////////////////////////////
@@ -862,5 +867,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.27 1999/02/03 08:43:33 bill Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.28 1999/02/16 21:59:51 mike Exp $".
//
diff --git a/src/dummymain.c b/src/dummymain.c
deleted file mode 100644
index 3c48576a7..000000000
--- a/src/dummymain.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * "$Id: dummymain.c,v 1.2 1999/01/07 19:17:34 mike Exp $"
- *
- * Dummy main() entry routine for the Fast Light Tool Kit (FLTK).
- * This is only used to build the WIN32 DLL.
- *
- * Copyright 1998-1999 by Bill Spitzak and others.
- *
- * 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@easysw.com".
- */
-
-#ifdef WIN32
-int main(int argc, char **argv) { return 0; }
-#endif /* WIN32 */
-
-/*
- * End of "$Id: dummymain.c,v 1.2 1999/01/07 19:17:34 mike Exp $".
- */