summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-01-03 22:54:29 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-01-03 22:54:29 +0000
commitacf6c881d36b675d755433d3cf48613bc46ed78d (patch)
tree13cebc8f8fd918767595da12fafb5a600db2feb3 /FL
parent933b00b9c9fe55d01a7f1c4831f171482806f85b (diff)
Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Enumerations.H4
-rw-r--r--FL/Fl.H27
-rw-r--r--FL/Fl_Bitmap.H3
-rw-r--r--FL/Fl_Cairo.H12
-rw-r--r--FL/Fl_Copy_Surface.H7
-rw-r--r--FL/Fl_Device.H47
-rw-r--r--FL/Fl_Gl_Window.H4
-rw-r--r--FL/Fl_Image.H2
-rw-r--r--FL/Fl_Image_Surface.H6
-rw-r--r--FL/Fl_Native_File_Chooser.H29
-rw-r--r--FL/Fl_Paged_Device.H9
-rw-r--r--FL/Fl_Pixmap.H7
-rw-r--r--FL/Fl_PostScript.H18
-rw-r--r--FL/Fl_Printer.H21
-rw-r--r--FL/Fl_Sys_Menu_Bar.H8
-rw-r--r--FL/Fl_Tooltip.H6
-rw-r--r--FL/Fl_Window.H23
-rw-r--r--FL/filename.H3
-rw-r--r--FL/fl_utf8.h9
-rw-r--r--FL/gl.h6
-rw-r--r--FL/x.H4
21 files changed, 220 insertions, 35 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index c73f67ee7..19da48ac5 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -577,6 +577,10 @@ enum Fl_When { // Fl_Widget::when():
#ifdef __APPLE__
# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
# define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: you need to define aliases for FL_COMMAND and FL_CONTROL"
+# define FL_COMMAND FL_CTRL
+# define FL_CONTROL FL_META
#else
# define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
# define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
diff --git a/FL/Fl.H b/FL/Fl.H
index 674873637..ebb40442d 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -50,6 +50,11 @@ struct Fl_Label;
# else
# define FL_SOCKET int
# endif
+#elif defined(__APPLE__)
+# define FL_SOCKET int
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define a type for FL_SOCKET"
+# define FL_SOCKET int // default if not ported
#else
# define FL_SOCKET int
#endif
@@ -158,6 +163,13 @@ public: // should be private!
#ifdef __APPLE__
static void reset_marked_text(); // resets marked text
static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point
+#elif defined(WIN32)
+ // not needed in WIN32
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define a type for FL_SOCKET"
+ // no default implementation
+#else
+ // not needed in X11
#endif
#endif // FL_DOXYGEN
@@ -856,9 +868,18 @@ public:
static void copy(const char* stuff, int len, int destination, const char *type);
static void copy(const char* stuff, int len, int destination = 0);
#endif
-
-#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN))
- static void copy_image(const unsigned char* data, int W, int H, int destination = 0); // platform dependent
+
+#if defined(__APPLE__)
+ // not needed
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_DOXYGEN)
+ // don't show in documentation
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: do you need to implement copy_image() ?"
+ // not implemented by default
+#else
+ static void copy_image(const unsigned char* data, int W, int H, int destination = 0); // X11 platform dependent
#endif
/**
Pastes the data from the selection buffer (\p source is 0) or the clipboard
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H
index a5a9b4590..75d84370f 100644
--- a/FL/Fl_Bitmap.H
+++ b/FL/Fl_Bitmap.H
@@ -48,6 +48,9 @@ public:
#if defined(__APPLE__) || defined(WIN32)
/** for internal use */
void *id_;
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define variables to hold a native bitmap in Fl_Bitmap"
+ unsigned id_; // default if not ported
#else
/** for internal use */
unsigned id_;
diff --git a/FL/Fl_Cairo.H b/FL/Fl_Cairo.H
index e11440056..2637ecc28 100644
--- a/FL/Fl_Cairo.H
+++ b/FL/Fl_Cairo.H
@@ -29,15 +29,17 @@
# include <FL/Fl_Export.H>
-# if defined(USE_X11) // X11
+#if defined(USE_X11) // X11
# include <cairo-xlib.h>
-# elif defined(WIN32)
+#elif defined(WIN32)
# include <cairo-win32.h>
-# elif defined(__APPLE_QUARTZ__)
+#elif defined(__APPLE_QUARTZ__)
# include <cairo-quartz.h>
-# else
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: is the Cairo library available on this platform?"
+#else
# error Cairo is not supported on that platform.
-# endif
+#endif
/**
\addtogroup group_cairo
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H
index 6b3f50799..b598e8dd0 100644
--- a/FL/Fl_Copy_Surface.H
+++ b/FL/Fl_Copy_Surface.H
@@ -64,6 +64,9 @@ private:
#elif defined(WIN32)
HDC oldgc;
HDC gc;
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define variables to hold a native offscreen bitmap in Fl_Copy_Surface"
+ // no default implementation
#else // Xlib
Fl_Offscreen xid;
Window oldwindow;
@@ -115,6 +118,10 @@ public:
virtual ~Fl_GDI_Surface_();
};
+#elif defined(FL_PORTING)
+
+# pragma message "FL_PORTING: define a drawing surface for your platform"
+
#elif !defined(FL_DOXYGEN)
/* Xlib class to implement translate()/untranslate() */
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index cd923c412..97266c391 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -57,6 +57,11 @@ typedef float COORD_T;
typedef struct { float x; float y; } QPoint;
# define XPOINT QPoint
extern float fl_quartz_line_width_;
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define types for COORD_T and XPOINT"
+typedef int COORD_T; // default if not ported
+typedef struct { int x; int y; } QPoint;
+# define XPOINT QPoint
#else
typedef short COORD_T;
# define XPOINT XPoint
@@ -131,6 +136,13 @@ private:
#ifdef WIN32
int numcount;
int counts[20];
+#elif defined(__APPLE__)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define variables for Fl_Graphics_Driver if needed."
+ // not needed
+#else
+ // not needed in X11
#endif
Fl_Font_Descriptor *font_descriptor_;
void transformed_vertex0(COORD_T x, COORD_T y);
@@ -166,6 +178,12 @@ protected:
friend void fl_draw(const char *str, int n, int x, int y);
#ifdef __APPLE__
friend void fl_draw(const char *str, int n, float x, float y);
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: add floating point text positioning if your platform supports it"
+#else
+ // not needed
#endif
friend void fl_draw(int angle, const char *str, int n, int x, int y);
friend void fl_rtl_draw(const char *str, int n, int x, int y);
@@ -251,6 +269,12 @@ protected:
virtual void draw(const char *str, int n, int x, int y) {}
#ifdef __APPLE__
virtual void draw(const char *str, int n, float x, float y) { draw(str, n, (int)(x+0.5), (int)(y+0.5));}
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: add floating point text positioning if your platform supports it"
+#else
+ // not needed
#endif
/** \brief see fl_draw(int angle, const char *str, int n, int x, int y). */
virtual void draw(int angle, const char *str, int n, int x, int y) {}
@@ -412,7 +436,9 @@ public:
virtual ~Fl_Graphics_Driver() { if (p) free(p); }
};
-#if defined(__APPLE__) || defined(FL_DOXYGEN)
+
+#if defined(__APPLE__)
+
/**
\brief The Mac OS X-specific graphics class.
*
@@ -449,8 +475,9 @@ public:
#endif
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
};
-#endif
-#if defined(WIN32) || defined(FL_DOXYGEN)
+
+#elif defined(WIN32) || defined(FL_DOXYGEN)
+
/**
\brief The MSWindows-specific graphics class.
*
@@ -497,8 +524,13 @@ public:
void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy);
int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP);
};
-#endif
-#if !(defined(__APPLE__) || defined(WIN32))
+
+#elif defined(FL_PORTING)
+
+# pragma message "FL_PORTING: define a native graphics driver Fl_xxx_Graphics_Driver"
+
+#else // X11
+
/**
\brief The Xlib-specific graphics class.
*
@@ -531,6 +563,7 @@ public:
void copy_offscreen_with_alpha(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
#endif
};
+
#endif
/**
@@ -590,6 +623,10 @@ class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device {
friend class Fl_Graphics_Driver;
static bool high_res_window_; //< true when drawing to a window of a retina display (Mac OS X only)
static bool high_resolution() {return high_res_window_;}
+#elif defined(WIN32)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: implement functions for extra high res drawing if your platform supports it"
+#else
#endif
public:
static const char *class_id;
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H
index 44e2a8711..07d987f01 100644
--- a/FL/Fl_Gl_Window.H
+++ b/FL/Fl_Gl_Window.H
@@ -240,6 +240,10 @@ public:
*/
#ifdef __APPLE__
int pixels_per_unit();
+#elif defined(WIN32)
+ int pixels_per_unit() { return 1; }
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define mutiple resolution OpenGL rendering if your platform supports it"
#else
int pixels_per_unit() { return 1; }
#endif
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 818e656ee..0396e6b48 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -208,6 +208,8 @@ public:
#if defined(__APPLE__) || defined(WIN32)
void *id_; // for internal use
void *mask_; // for internal use (mask bitmap)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define variables to hold an RGB image and a mask for Fl_RGB_Image"
#else
unsigned id_; // for internal use
unsigned mask_; // for internal use (mask bitmap)
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H
index 3414f72af..b3842dad5 100644
--- a/FL/Fl_Image_Surface.H
+++ b/FL/Fl_Image_Surface.H
@@ -55,6 +55,8 @@ private:
Window _sw;
Fl_Surface_Device *_ss;
int _savedc;
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define variables to hold imaga data for Fl_Image_Surface"
#else
Fl_Surface_Device *previous;
Window pre_window;
@@ -81,6 +83,10 @@ public:
void untranslate();
virtual ~Fl_Quartz_Flipped_Surface_() {};
};
+#elif defined(WIN32)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define a helper class for Fl_Image_Surface if needed"
+#else
#endif
#endif // Fl_Image_Surface_H
diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H
index 1a9912a29..135f0399c 100644
--- a/FL/Fl_Native_File_Chooser.H
+++ b/FL/Fl_Native_File_Chooser.H
@@ -25,6 +25,7 @@
// Use Windows' chooser
#ifdef WIN32
+
// #define _WIN32_WINNT 0x0501 // needed for OPENFILENAME's 'FlagsEx'
#if defined(FL_LIBRARY) || FLTK_ABI_VERSION < 10304
# include <windows.h>
@@ -36,18 +37,21 @@ typedef BROWSEINFOW fl_BROWSEINFOW;
typedef void fl_OPENFILENAMEW;
typedef void fl_BROWSEINFOW;
#endif
-#endif
+# include <FL/filename.H> // FL_EXPORT
// Use Apple's chooser
-#ifdef __APPLE__
+#elif defined(__APPLE__)
# define MAXFILTERS 80
-#endif
+# include <FL/filename.H> // FL_EXPORT
+
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define a file chooser if one is available on your platform"
+# include <FL/Fl_File_Chooser.H> // default to FLTK file chooser if none id ported
// All else falls back to FLTK's own chooser
-#if ! defined(__APPLE__) && !defined(WIN32)
-# include <FL/Fl_File_Chooser.H>
#else
-# include <FL/filename.H> // FL_EXPORT
+# include <FL/Fl_File_Chooser.H>
+
#endif
class Fl_FLTK_File_Chooser;
@@ -192,9 +196,8 @@ private:
void parse_filter(const char *);
void clear_filters();
void add_filter(const char *, const char *);
-#endif
-#ifdef __APPLE__
+#elif defined(__APPLE__)
private:
int _btype; // kind-of browser to show()
int _options; // general options
@@ -230,9 +233,12 @@ private:
void parse_filter(const char *from);
int post();
int runmodal();
-#endif
-#if ! defined(__APPLE__) && !defined(WIN32)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define member variables for file chooser if one is available on your platform"
+
+#else
+
private:
#if FLTK_ABI_VERSION <= 10302
int _btype; // kind-of browser to show()
@@ -254,7 +260,8 @@ private:
#endif
};
-#if !defined(__APPLE__) && !defined(WIN32)
+
+#if !defined(__APPLE__) && !defined(WIN32) && !defined(FL_PORTING)
class FL_EXPORT Fl_FLTK_File_Chooser {
friend class Fl_Native_File_Chooser;
protected:
diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H
index 5869018b5..9dd6b7d8d 100644
--- a/FL/Fl_Paged_Device.H
+++ b/FL/Fl_Paged_Device.H
@@ -36,7 +36,14 @@
or Fl_PostScript_File_Device instead.
*/
class FL_EXPORT Fl_Paged_Device : public Fl_Surface_Device {
-#ifndef __APPLE__
+#ifdef __APPLE__
+ // not needed
+#elif defined(WIN32)
+ friend class Fl_Copy_Surface;
+ void draw_decorated_window(Fl_Window *win, int x_offset, int y_offset, Fl_Surface_Device *toset);
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define member variables to support Fl_Copy_Surface in Fl_Paged_Device"
+#else // X11
friend class Fl_Copy_Surface;
void draw_decorated_window(Fl_Window *win, int x_offset, int y_offset, Fl_Surface_Device *toset);
#endif
diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H
index 6f93da7e8..4be6ee28c 100644
--- a/FL/Fl_Pixmap.H
+++ b/FL/Fl_Pixmap.H
@@ -64,10 +64,13 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
static // a static member is needed for ABI compatibility
#endif
UINT pixmap_bg_color; // RGB color used for pixmap background
-#endif // WIN32
-#if defined(__APPLE__) || defined(WIN32)
void *id_; // for internal use
void *mask_; // for internal use (mask bitmap)
+#elif defined(__APPLE__)
+ void *id_; // for internal use
+ void *mask_; // for internal use (mask bitmap)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define member variables to store an RGB image and a mask for Fl_Pixmap"
#else
unsigned id_; // for internal use
unsigned mask_; // for internal use (mask bitmap)
diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H
index c635e88ef..1c048391f 100644
--- a/FL/Fl_PostScript.H
+++ b/FL/Fl_PostScript.H
@@ -201,6 +201,12 @@ class Clip {
void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); };
#ifdef __APPLE__
void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); };
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define floating point position text drawing if you have it"
+#else // X11
+ // not needed
#endif
void draw(int angle, const char *str, int n, int x, int y);
void rtl_draw(const char* s, int n, int x, int y);
@@ -226,6 +232,12 @@ class Clip {
class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device {
#ifdef __APPLE__
CGContextRef gc;
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define storage for your graphics context in Fl_Postscript_File_Device if needed"
+#else // X11
+ // not needed
#endif
protected:
Fl_PostScript_Graphics_Driver *driver();
@@ -252,6 +264,12 @@ public:
void end_job(void);
#ifdef __APPLE__
void set_current() { fl_gc = gc; Fl_Paged_Device::set_current(); }
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: set access to your graphics context in Fl_Postscript_File_Device if needed"
+#else // X11
+ // not needed
#endif
static const char *file_chooser_title;
diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H
index 7ff255f24..ffea61dc1 100644
--- a/FL/Fl_Printer.H
+++ b/FL/Fl_Printer.H
@@ -30,10 +30,14 @@
#include <FL/Fl_RGB_Image.H>
#include <FL/Fl_Bitmap.H>
#include <stdio.h>
-#if !(defined(__APPLE__) || defined(WIN32))
-#include <FL/Fl_PostScript.H>
-#elif defined(WIN32)
+#ifdef WIN32
#include <commdlg.h>
+#elif defined(__APPLE__)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: include files needed for printing support"
+#else // X11
+#include <FL/Fl_PostScript.H>
#endif
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)
@@ -91,9 +95,12 @@ public:
~Fl_System_Printer(void);
}; // class Fl_System_Printer
-#endif
-
-#if !(defined(__APPLE__) || defined(WIN32) )
+#elif defined(FL_PORTING)
+
+# pragma message "FL_PORTING: define your own Fl_xxx_Printer class"
+
+#else
+
/**
Print support under Unix/Linux.
@@ -224,6 +231,8 @@ public:
private:
#if defined(WIN32) || defined(__APPLE__)
Fl_System_Printer *printer;
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: instantiate your own Fl_xxx_Printer here"
#else
Fl_PostScript_Printer *printer;
#endif
diff --git a/FL/Fl_Sys_Menu_Bar.H b/FL/Fl_Sys_Menu_Bar.H
index a3cf521d9..da80e8913 100644
--- a/FL/Fl_Sys_Menu_Bar.H
+++ b/FL/Fl_Sys_Menu_Bar.H
@@ -93,6 +93,14 @@ public:
void setonly (Fl_Menu_Item *item) { Fl_Menu_::setonly(item); update(); }
};
+#elif defined(WIN32)
+
+typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
+
+#elif defined(FL_PORTING)
+
+# pragma message "FL_PORTING: define your own system menu class"
+
#else
typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H
index 300c921dd..f3aef8b34 100644
--- a/FL/Fl_Tooltip.H
+++ b/FL/Fl_Tooltip.H
@@ -100,6 +100,12 @@ public:
#ifdef __APPLE__
// the unique tooltip window
static Fl_Window* current_window(void);
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: do we need to remember the tooltip parent window?"
+#else // X11
+ // not needed
#endif
// These should not be public, but Fl_Widget::tooltip() needs them...
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index f84ab1c9a..0a69a4c13 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -103,6 +103,12 @@ class FL_EXPORT Fl_Window : public Fl_Group {
#ifdef WIN32
HICON big_icon;
HICON small_icon;
+#elif defined(__APPLE__)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define storage for per-window icons here if needed"
+#else // X11
+ // not needed
#endif
};
@@ -129,6 +135,12 @@ protected:
#if defined(__APPLE__)
typedef struct CGImage* CGImageRef;
CGImageRef mask;
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define storage for a window mask here if needed"
+#else // X11
+ // not needed
#endif
Fl_Bitmap *todelete_; ///< auxiliary bitmap image
};
@@ -147,7 +159,10 @@ public:
\see void shape(const Fl_Image* img)
*/
inline void shape(const Fl_Image& b) { shape(&b); }
-#if ! (defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN))
+#if defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN)
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: do you need a combine_mask() function in Fl_Window?"
+#else // X11
void combine_mask(void);
#endif
private:
@@ -471,6 +486,12 @@ public:
#ifdef WIN32
static void default_icons(HICON big_icon, HICON small_icon);
void icons(HICON big_icon, HICON small_icon);
+#elif defined(__APPLE__)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define functions to handle window icons here if needed"
+#else // X11
+ // not needed
#endif
/* for legacy compatibility */
diff --git a/FL/filename.H b/FL/filename.H
index f5c87bc6a..1d3ca6249 100644
--- a/FL/filename.H
+++ b/FL/filename.H
@@ -81,6 +81,9 @@ struct dirent {char d_name[1];};
# include <sys/types.h>
# include <direct.h>
+# elif defined(FL_PORTING)
+# pragma message "FL_PORTING: insert the equivalent to dirent.h on your system"
+ struct dirent {char d_name[1];}; // default if not ported
# else
/*
* WARNING: on some systems (very few nowadays?) <dirent.h> may not exist.
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h
index 7ac79e1f5..b19f2a962 100644
--- a/FL/fl_utf8.h
+++ b/FL/fl_utf8.h
@@ -57,6 +57,9 @@
# include <wchar.h>
# include <sys/stat.h>
# define xchar wchar_t
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: include utf8 support files and define utf8 types"
+# define xchar unsigned short
#else /* X11 */
# include <sys/types.h>
# include <sys/stat.h>
@@ -158,6 +161,12 @@ FL_EXPORT char *fl_utf8_to_locale(const char *s, int len, unsigned int codepage)
/* OD: Attempt to convert a string in the current locale to UTF-8 */
FL_EXPORT char *fl_locale_to_utf8(const char *s, int len, unsigned int codepage);
+#elif defined(__APPLE__)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: do you want to be able to convert from a local charset to utf8?"
+#else // X11
+ // not needed
#endif
/*****************************************************************************
diff --git a/FL/gl.h b/FL/gl.h
index bb0881df1..2d2fdc274 100644
--- a/FL/gl.h
+++ b/FL/gl.h
@@ -92,6 +92,12 @@ FL_EXPORT void gl_measure(const char*, int& x, int& y);
#ifdef __APPLE__
extern FL_EXPORT void gl_texture_pile_height(int max);
extern FL_EXPORT int gl_texture_pile_height();
+#elif defined(WIN32)
+ // not needed
+#elif defined(FL_PORTING)
+# pragma message "FL_PORTING: define functions to control OpenGL texture pile height if supported"
+#else // X11
+ // not needed
#endif
FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
diff --git a/FL/x.H b/FL/x.H
index a15b8acd4..d2b25f954 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -30,7 +30,9 @@
# include "win32.H"
# elif defined(__APPLE__)
# include "mac.H"
-# else
+# elif defined(FL_PORTING)
+# pragma message "FL_PORTING: write a header file based on this file, win32.H, or mac.H to define the FLTK core internals"
+# else // X11
# if defined(_ABIN32) || defined(_ABI64) // fix for broken SGI Irix X .h files
# pragma set woff 3322
# endif