Author: matt
Date: 2011-05-26 08:59:20 -0700 (Thu, 26 May 2011)
New Revision: 8741
Log:
123: some fixes for Linux. Must run. Later more.

Modified:
   branches/branch-3.0/fltk3/x.h
   branches/branch-3.0/src/Fl_Bitmap.cxx
   branches/branch-3.0/src/Fl_Device.cxx
   branches/branch-3.0/src/Fl_Image.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx
   branches/branch-3.0/src/Fl_Pixmap.cxx
   branches/branch-3.0/src/Fl_PostScript.cxx

Modified: branches/branch-3.0/fltk3/x.h
===================================================================
--- branches/branch-3.0/fltk3/x.h       2011-05-26 14:43:46 UTC (rev 8740)
+++ branches/branch-3.0/fltk3/x.h       2011-05-26 15:59:20 UTC (rev 8741)
@@ -63,7 +63,9 @@
 #    include "Window.h"
 #    include "Xutf8.h"
 // Mirror X definition of Region to fltk3::Region, for portability...
-typedef Region fltk3::Region;
+namespace fltk3 {
+  typedef ::Region Region;
+}
 
 FLTK3_EXPORT void fl_open_display();
 FLTK3_EXPORT void fl_open_display(Display*);
@@ -81,9 +83,12 @@
 extern FLTK3_EXPORT Window fl_window;
 FLTK3_EXPORT ulong fl_xpixel(fltk3::Color i);
 FLTK3_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b);
-FLTK3_EXPORT void fltk3::clip_region(fltk3::Region);
-FLTK3_EXPORT fltk3::Region fltk3::clip_region();
 
+namespace fltk3 {
+  FLTK3_EXPORT void clip_region(fltk3::Region);
+  FLTK3_EXPORT fltk3::Region clip_region();
+}
+
 // feed events into fltk:
 FLTK3_EXPORT int fl_handle(const XEvent&);
 
@@ -102,7 +107,7 @@
              w, h, fl_visual->depth)
 // begin/end are macros that save the old state in local variables:
 #    define fl_begin_offscreen(pixmap) \
-  Window _sw=fl_window; fl_window=pixmap; \
+  ::Window _sw=fl_window; fl_window=pixmap; \
   fltk3::SurfaceDevice *_ss = fltk3::SurfaceDevice::surface(); 
fltk3::DisplayDevice::display_device()->set_current(); \
   fltk3::push_no_clip()
 #    define fl_end_offscreen() \
@@ -121,7 +126,9 @@
 extern FLTK3_EXPORT void fl_delete_bitmask(fltk3::Bitmask bm);
 
 #if defined(FL_LIBRARY) || defined(FLTK3_INTERNALS)
-extern FLTK3_EXPORT Window fltk3::message_window;
+namespace fltk3 {
+  extern FLTK3_EXPORT Window message_window;
+}
 extern FLTK3_EXPORT void *fl_xftfont;
 FLTK3_EXPORT fltk3::Region XRectangleRegion(int x, int y, int w, int h); // in 
fltk3::rect.cxx
 

Modified: branches/branch-3.0/src/Fl_Bitmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Bitmap.cxx       2011-05-26 14:43:46 UTC (rev 
8740)
+++ branches/branch-3.0/src/Fl_Bitmap.cxx       2011-05-26 15:59:20 UTC (rev 
8741)
@@ -349,7 +349,7 @@
 }  
 
 #else // Xlib
-void Fl_Xlib_Graphics_Driver::draw(fltk3::Bitmap *bm, int XP, int YP, int WP, 
int HP, int cx, int cy) {
+void fltk3::XlibGraphicsDriver::draw(fltk3::Bitmap *bm, int XP, int YP, int 
WP, int HP, int cx, int cy) {
   int X, Y, W, H;
   if (!bm->array) {
     bm->draw_empty(XP, YP);

Modified: branches/branch-3.0/src/Fl_Device.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Device.cxx       2011-05-26 14:43:46 UTC (rev 
8740)
+++ branches/branch-3.0/src/Fl_Device.cxx       2011-05-26 15:59:20 UTC (rev 
8741)
@@ -40,7 +40,9 @@
 const char *Fl_GDI_Graphics_Driver::class_id = "Fl_GDI_Graphics_Driver";
 #endif
 #if !(defined(__APPLE__) || defined(WIN32))
-const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver";
+namespace fltk3 {
+  const char *XlibGraphicsDriver::class_id = "Fl_Xlib_Graphics_Driver";
+}
 #endif
 
 

Modified: branches/branch-3.0/src/Fl_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Image.cxx        2011-05-26 14:43:46 UTC (rev 
8740)
+++ branches/branch-3.0/src/Fl_Image.cxx        2011-05-26 15:59:20 UTC (rev 
8741)
@@ -531,7 +531,7 @@
 }
 
 #else
-void Fl_Xlib_Graphics_Driver::draw(fltk3::RGBImage *img, int XP, int YP, int 
WP, int HP, int cx, int cy) {
+void fltk3::XlibGraphicsDriver::draw(fltk3::RGBImage *img, int XP, int YP, int 
WP, int HP, int cx, int cy) {
   int X, Y, W, H;
   // Don't draw an empty image...
   if (!img->d() || !img->array) {

Modified: branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx     2011-05-26 
14:43:46 UTC (rev 8740)
+++ branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx     2011-05-26 
15:59:20 UTC (rev 8741)
@@ -42,7 +42,7 @@
   Optional \p val presets the type of browser this will be, 
   which can also be changed with type().
 */
-fltk3::NativeFileChooser::fltk3::NativeFileChooser(int val) {
+fltk3::NativeFileChooser::NativeFileChooser(int val) {
   //// CANT USE THIS -- MESSES UP LINKING/CREATES DEPENDENCY ON fltk_images.
   //// Have app call this from main() instead.
   ////
@@ -70,7 +70,7 @@
   Destructor. 
   Deallocates any resources allocated to this widget.
 */
-fltk3::NativeFileChooser::~Fl_Native_File_Chooser() {
+fltk3::NativeFileChooser::~NativeFileChooser() {
   delete _file_chooser;
   _filter      = strfree(_filter);
   _parsedfilt  = strfree(_parsedfilt);
@@ -198,7 +198,7 @@
     // HANDLE SHOWING 'SaveAs' CONFIRM
     if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
       struct stat buf;
-      if ( stat(_file_chooser->value(), &buf) != -1 ) {
+      if ( fltk3::stat(_file_chooser->value(), &buf) != -1 ) {
        if ( buf.st_mode & S_IFREG ) {          // Regular file + exists?
          if ( exist_dialog() == 0 ) {
            return(1);

Modified: branches/branch-3.0/src/Fl_Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pixmap.cxx       2011-05-26 14:43:46 UTC (rev 
8740)
+++ branches/branch-3.0/src/Fl_Pixmap.cxx       2011-05-26 15:59:20 UTC (rev 
8741)
@@ -193,7 +193,7 @@
 }
 
 #else // Xlib
-void Fl_Xlib_Graphics_Driver::draw(fltk3::Pixmap *pxm, int XP, int YP, int WP, 
int HP, int cx, int cy) {
+void fltk3::XlibGraphicsDriver::draw(fltk3::Pixmap *pxm, int XP, int YP, int 
WP, int HP, int cx, int cy) {
   int X, Y, W, H;
   if (pxm->w() < 0) pxm->measure();
   int code = start(pxm, XP, YP, WP, HP, pxm->w(), pxm->h(), cx, cy, X, Y, W, 
H);

Modified: branches/branch-3.0/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PostScript.cxx   2011-05-26 14:43:46 UTC (rev 
8740)
+++ branches/branch-3.0/src/Fl_PostScript.cxx   2011-05-26 15:59:20 UTC (rev 
8741)
@@ -33,7 +33,7 @@
 #include <fltk3/PostScript.h>
 #include <fltk3/NativeFileChooser.h>
 #if defined(USE_X11)
-#include "Font.H"
+#include "Fl_Font.H"
 #if USE_XFT
 #include <X11/Xft/Xft.h>
 #endif

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to