DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2332
Version: 1.3-current


Compile errors were encountered when trying to compile fltk under VC++
2008.  The attached patch fixes these errors.


Link: http://www.fltk.org/str.php?L2332
Version: 1.3-current
diff -Naur fltk-1.3.x-r7309.patched//FL/Fl_Device.H 
fltk-1.3.x-r7309/FL/Fl_Device.H
--- fltk-1.3.x-r7309.patched//FL/Fl_Device.H    2010-03-20 18:11:26.000000000 
-0400
+++ fltk-1.3.x-r7309/FL/Fl_Device.H     2010-03-20 18:56:19.000000000 -0400
@@ -45,7 +45,7 @@
 class Fl_Bitmap;
 class Fl_Display;
 class Fl_Abstract_Printer;
-extern Fl_Display *fl_display_device;
+extern FL_EXPORT Fl_Display *fl_display_device;
 typedef void (*Fl_Draw_Image_Cb)(void* ,int,int,int,uchar*);
 
 /**
@@ -104,8 +104,8 @@
   friend void fl_draw_image(const uchar*, int,int,int,int, int delta, int 
ldelta);
   friend void fl_draw_image_mono(const uchar*, int,int,int,int, int delta, int 
ld);
   friend void fl_draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int 
delta);
-  friend void fl_draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int 
delta);
-  
+  friend FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb, void*, 
int,int,int,int, int delta);
+
   virtual void rect(int x, int y, int w, int h);
   virtual void rectf(int x, int y, int w, int h);
   virtual void line_style(int style, int width=0, char* dashes=0);
@@ -159,12 +159,12 @@
   virtual   void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, 
int cy);
   virtual   void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int 
cx, int cy);
   virtual   void draw(Fl_Bitmap * bmp,int XP, int YP, int WP, int HP, int cx, 
int cy);
-  
+
 public:
-  /** 
+  /**
    @brief All implemented graphics output devices.
    */
-  enum device_types { 
+  enum device_types {
     xlib_display = 0, /**< The X11 display. */
     quartz_display,  /**< The Mac OS X display. */
     gdi_display,  /**< The MSWindows display. */
@@ -172,8 +172,8 @@
     quartz_printer,  /**< The Mac OS X printer. */
     postscript_device  /**< The PostScript device. */
   };
-  /** 
-   @brief An RTTI emulation of device classes. It returns values < 256 if it 
is a display device 
+  /**
+   @brief An RTTI emulation of device classes. It returns values < 256 if it 
is a display device
    */
   int type() {return type_;};
   /**
@@ -182,21 +182,21 @@
    @return  The current target device of graphics calls.
    */
   virtual Fl_Device *set_current();
-  
+
   virtual ~Fl_Device() {};
 
   /**
    @brief    Returns the current target device of graphics calls.
    */
   static Fl_Device *current();
-  
+
   /**
    @brief    Returns the platform's display device.
    */
   static Fl_Display *display_device() { return fl_display_device; };
-  
+
 };
-extern Fl_Device *fl_device;
+extern FL_EXPORT Fl_Device *fl_device;
 
 /**
  @brief A virtual class subclassed for OS-specific display graphics.
diff -Naur fltk-1.3.x-r7309.patched//src/Fl_GDI_Printer.cxx 
fltk-1.3.x-r7309/src/Fl_GDI_Printer.cxx
--- fltk-1.3.x-r7309.patched//src/Fl_GDI_Printer.cxx    2010-03-20 
18:11:25.000000000 -0400
+++ fltk-1.3.x-r7309/src/Fl_GDI_Printer.cxx     2010-03-20 18:37:38.000000000 
-0400
@@ -31,6 +31,7 @@
 
 #include <FL/fl_ask.H>
 #include <math.h>
+#include <FL/math.h>
 
 extern HWND fl_window;
 
@@ -42,13 +43,13 @@
 static void WIN_SetupPrinterDeviceContext(HDC prHDC)
 {
   if ( !prHDC ) return;
-  
+
   fl_window = 0;
   fl_gc = prHDC;
   SetGraphicsMode(prHDC, GM_ADVANCED); // to allow for rotations
   SetMapMode(prHDC, MM_ANISOTROPIC);
   SetTextAlign(prHDC, TA_BASELINE|TA_LEFT);
-  SetBkMode(prHDC, TRANSPARENT);       
+  SetBkMode(prHDC, TRANSPARENT);
   // this matches 720 logical units to the number of device units in 10 inches 
of paper
   // thus the logical unit is the point (= 1/72 inch)
   SetWindowExtEx(prHDC, 720, 720, NULL);
@@ -63,7 +64,7 @@
   DOCINFO     di;
   char        docName [256];
   int err = 0;
-  
+
   abortPrint = FALSE;
   memset (&pd, 0, sizeof (PRINTDLG));
   pd.lStructSize = sizeof (PRINTDLG);
@@ -133,10 +134,10 @@
 {
   POINT         physPageSize;
   POINT         pixelsPerInch;
-    
+
   if (hPr == NULL) return;
   SetWindowOrgEx(fl_gc, 0, 0, NULL);
-  
+
   physPageSize.x = GetDeviceCaps(hPr, HORZRES);
   physPageSize.y = GetDeviceCaps(hPr, VERTRES);
   DPtoLP(hPr, &physPageSize, 1);
@@ -149,7 +150,7 @@
   *w -= (pixelsPerInch.x / 2);
   top_margin = (pixelsPerInch.y / 4);
   *h -= (pixelsPerInch.y / 2);
-  
+
   *x = left_margin;
   *y = top_margin;
   origin(x_offset, y_offset);
@@ -175,7 +176,7 @@
 int Fl_Printer::start_page (void)
 {
   int  rsult, w, h;
-  
+
   rsult = 0;
   if (hPr != NULL) {
     WIN_SetupPrinterDeviceContext (hPr);
@@ -224,7 +225,7 @@
 int Fl_Printer::end_page (void)
 {
   int  rsult;
-  
+
   rsult = 0;
   if (hPr != NULL) {
     prerr = EndPage (hPr);
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to