]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/ImageLoaderXPM.C
remove more forms.h cruft
[lyx.git] / src / graphics / ImageLoaderXPM.C
index 87be5a1b1c3eacb593245eb1d371662b1169d8d3..b92a0bb0113da7c5cf6f7d91b8bda7b3b90051ee 100644 (file)
@@ -1,10 +1,9 @@
-// -*- C++ -*-
 /* This file is part of
  * =================================================
  * 
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
- *          Copyright 1995-2000 The LyX Team.
+ *          Copyright 1995-2001 The LyX Team.
  *
  * ================================================= */
 
@@ -15,9 +14,9 @@
 #include <config.h>
 #include "ImageLoaderXPM.h"
 #include "frontends/support/LyXImage.h"
+#include "frontends/GUIRunTime.h"
 #include "support/filetools.h"
 
-#include FORMS_H_LOCATION
 #include XPM_H_LOCATION
 #include <iostream>
 #include <fstream>
@@ -59,11 +58,13 @@ ImageLoaderXPM::loadableFormats() const
 ImageLoader::Result 
 ImageLoaderXPM::runImageLoader(string const & filename)
 {
-       Display * display = fl_get_display();
+       Display * display = GUIRunTime::x11Display();
 
 //(BE 2000-08-05)
+#ifdef WITH_WARNINGS
 #warning This might be a dirty thing, but I dont know any other solution.
-       Screen * screen = ScreenOfDisplay(display, fl_screen);
+#endif
+       Screen * screen = ScreenOfDisplay(display, GUIRunTime::x11Screen());
 
        Pixmap pixmap;
        Pixmap mask;
@@ -84,7 +85,7 @@ ImageLoaderXPM::runImageLoader(string const & filename)
        }
        
        // This should have been set by the XpmReadFileToPixmap call!
-       Assert(attrib.valuemask & XpmSize);
+       lyx::Assert(attrib.valuemask & XpmSize);
 
        setImage(new LyXImage(pixmap, attrib.width, attrib.height));