diff options
Diffstat (limited to 'src')
66 files changed, 396 insertions, 12 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 357fb55f0..2976baa3c 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -59,6 +59,13 @@ #endif // DEBUG || DEBUG_WATCH #ifdef WIN32 +#elif defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement global variables for your platform here" +#else // X11 +#endif + +#ifdef WIN32 # include <ole2.h> void fl_free_fonts(void); HBRUSH fl_brush_action(int action); @@ -243,6 +250,10 @@ int Fl::event_inside(const Fl_Widget *o) /*const*/ { // implementation in Fl_cocoa.mm (was Fl_mac.cxx) +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement timers in your platform specific core file" + #else // @@ -543,6 +554,10 @@ double Fl::wait(double time_to_wait) { run_checks(); return fl_mac_flush_and_wait(time_to_wait); +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement waiting for a timer or a message from the system" + #else if (first_timeout) { @@ -676,7 +691,11 @@ int Fl::check() { \endcode */ int Fl::ready() { -#if ! defined( WIN32 ) && ! defined(__APPLE__) +#if defined( WIN32 ) || defined(__APPLE__) + // not used +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: you may need to handle timers here." +#else // X11 if (first_timeout) { elapse_timeouts(); if (first_timeout->time <= 0) return 1; @@ -780,6 +799,8 @@ void Fl::flush() { #elif defined (__APPLE_QUARTZ__) if (fl_gc) CGContextFlush(fl_gc); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: flush your graohics context here" #else # error unsupported platform #endif @@ -978,6 +999,9 @@ void Fl::focus(Fl_Widget *o) { else if (x) // New WMs use the NETWM attribute: Fl_X::activate_window(x->xid); } +#elif defined(WIN32) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: handle platform specifics for change of keyboard focus here" #endif fl_xfocus = win; } @@ -1119,7 +1143,13 @@ void fl_throw_focus(Fl_Widget *o) { #endif // DEBUG if (o->contains(Fl::pushed())) Fl::pushed_ = 0; -#if !(defined(WIN32) || defined(__APPLE__)) +#ifdef WIN32 + // not used +#elif defined(__APPLE__) + // not used +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: platform specific code when deleting a window" +#else if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0; #endif if (o->contains(Fl::belowmouse())) Fl::belowmouse_ = 0; @@ -1627,6 +1657,8 @@ void Fl_Window::hide() { } #elif defined(__APPLE_QUARTZ__) ip->destroy(); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: code to destroy a window on screen" #else # error unsupported platform #endif @@ -1659,6 +1691,8 @@ int Fl_Window::handle(int ev) XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless #elif defined(__APPLE_QUARTZ__) i->map(); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: code to show a window on screen" #else # error unsupported platform #endif // __APPLE__ @@ -1681,6 +1715,8 @@ int Fl_Window::handle(int ev) XUnmapWindow(fl_display, fl_xid(this)); #elif defined(__APPLE_QUARTZ__) i->unmap(); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: code to hide a window from screen" #else # error platform unsupported #endif @@ -1867,6 +1903,8 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) { i->region->rects = (CGRect*)realloc(i->region->rects, (++(i->region->count)) * sizeof(CGRect)); i->region->rects[i->region->count - 1] = arg; } +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: code to merge damage regions" #else # error unsupported platform #endif diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index da64c878e..42be41a77 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -150,6 +150,10 @@ void fl_delete_bitmask(Fl_Bitmask bm) { } +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement fl_create_bitmap" + #else // X11 bitmask functions @@ -262,8 +266,10 @@ int Fl_Bitmap::start(int XP, int YP, int WP, int HP, int &cx, int &cy, if (H <= 0) return 1; #if defined(WIN32) if (!id_) id_ = fl_create_bitmap(w(), h(), array); -#else +#elif defined(__APPLE__) || defined(USE_X11) if (!id_) id_ = fl_create_bitmask(w(), h(), array); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: call the right funtion to create a bitmap" #endif return 0; } @@ -345,6 +351,10 @@ void Fl_GDI_Printer_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, DeleteDC(tempdc); } +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement Fl_Xlib_Graphics_Driver::draw()" + #else // Xlib void Fl_Xlib_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) { int X, Y, W, H; @@ -375,8 +385,10 @@ void Fl_Bitmap::uncache() { if (id_) { #ifdef __APPLE_QUARTZ__ fl_delete_bitmask((Fl_Bitmask)id_); -#else +#elif defined(WIN32) || defined(USE_X11) fl_delete_bitmask((Fl_Offscreen)id_); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: call the right funtion to create a bitmask" #endif id_ = 0; } diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index c14e0ce74..b1fe45725 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -97,6 +97,8 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL) SetTextAlign(gc, TA_BASELINE|TA_LEFT); SetBkMode(gc, TRANSPARENT); } +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: initialize memebrs of Fl_Copy_Surface" #else // Xlib helper = new Fl_Xlib_Surface_(); driver(helper->driver()); @@ -133,6 +135,8 @@ Fl_Copy_Surface::~Fl_Copy_Surface() DeleteDC(gc); fl_gc = oldgc; delete (Fl_GDI_Surface_*)helper; +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: free resources in destructo of Fl_Copy_Surface" #else // Xlib fl_pop_clip(); unsigned char *data = fl_read_image(NULL,0,0,width,height,0); @@ -162,6 +166,8 @@ void Fl_Copy_Surface::set_current() fl_gc = gc; fl_window = (Window)1; Fl_Surface_Device::set_current(); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement Fl_Copy_Surface::set_current" #else fl_window=xid; _ss = Fl_Surface_Device::surface(); diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index a35227b23..7a487cd26 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -20,6 +20,12 @@ #include <FL/Fl_Device.H> #include <FL/Fl_Image.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: instantiate and implement various device drivers here" +#else +#endif + const char *Fl_Device::class_id = "Fl_Device"; const char *Fl_Surface_Device::class_id = "Fl_Surface_Device"; const char *Fl_Display_Device::class_id = "Fl_Display_Device"; @@ -86,6 +92,8 @@ Fl_Display_Device *Fl_Display_Device::display_device() { Fl_Quartz_Graphics_Driver #elif defined(WIN32) Fl_GDI_Graphics_Driver +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: instantiate your display driver here" #else Fl_Xlib_Graphics_Driver #endif diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 83af44b62..397507a95 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -108,6 +108,8 @@ void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx ((Fl_GDI_Graphics_Driver*)fl_graphics_driver)->copy_offscreen(x, y, w, h, pixmap, srcx, srcy); #elif defined(__APPLE__) ((Fl_Quartz_Graphics_Driver*)fl_graphics_driver)->copy_offscreen(x, y, w, h, pixmap, srcx, srcy); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: call our version of fl_copy_offscreen" #endif } else { // when copy is not to the display @@ -379,6 +381,7 @@ void fl_end_offscreen() { #else +# pragma message "FL_PORTING: implement offscreen render space generation and management" # error unsupported platform #endif @@ -416,6 +419,7 @@ void Fl_Double_Window::flush(int eraseoverlay) { clear_damage(FL_DAMAGE_ALL); } #else +# pragma message "FL_PORTING: call a function to clear any graphics port damage flags" # error unsupported platform #endif } @@ -467,6 +471,8 @@ void Fl_Double_Window::flush(int eraseoverlay) { } else { draw(); } +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: manage double buffered drawing" #else // X: fl_window = myi->other_xid; draw(); diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx index 17ff1afbd..a1a114f76 100644 --- a/src/Fl_File_Browser.cxx +++ b/src/Fl_File_Browser.cxx @@ -26,6 +26,12 @@ // Fl_File_Browser::filter() - Set the filename filter. // +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the iternals of your file browser here" +#else +#endif + // // Include necessary header files... // diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 6527a77dd..756aedf73 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -357,6 +357,12 @@ #include <sys/types.h> #include <sys/stat.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the internal of your filechooser here" +#else +#endif + #if defined(WIN32) && ! defined (__CYGWIN__) # include <direct.h> # include <io.h> diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx index 3d35e10e4..4c8cf2367 100644 --- a/src/Fl_File_Icon.cxx +++ b/src/Fl_File_Icon.cxx @@ -51,6 +51,11 @@ #include <FL/fl_draw.H> #include <FL/filename.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement file type interpretation here" +#else +#endif // // Define missing POSIX/XPG4 macros as needed... diff --git a/src/Fl_Font.H b/src/Fl_Font.H index 7a98650b2..561f249a2 100644 --- a/src/Fl_Font.H +++ b/src/Fl_Font.H @@ -26,6 +26,13 @@ #include <config.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement font descriptor details here" +#else +#endif + + # if USE_XFT typedef struct _XftFont XftFont; # elif !defined(WIN32) && !defined(__APPLE__) @@ -65,6 +72,8 @@ public: //const char* encoding; int angle; FL_EXPORT Fl_Font_Descriptor(const char* xfontname, Fl_Fontsize size, int angle); +# elif defined(FL_PORTING) +# pragma message "FL_PORTING: define variables and storage types for font handling" # else XUtf8FontStruct* font; // X UTF-8 font information FL_EXPORT Fl_Font_Descriptor(const char* xfontname); @@ -87,15 +96,28 @@ struct Fl_Fontdesc { const char *name; char fontname[128]; // "Pretty" font name Fl_Font_Descriptor *first; // linked list of sizes of this style -# ifndef WIN32 +#ifdef WIN32 +#elif defined(__APPLE__) char **xlist; // matched X font names int n; // size of xlist, negative = don't free xlist! -# endif +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: do you need additional storage in Fl_Fontdesc?" +#else + char **xlist; // matched X font names + int n; // size of xlist, negative = don't free xlist! +#endif }; extern FL_EXPORT Fl_Fontdesc *fl_fonts; // the table -# ifndef WIN32 +#ifdef WIN32 +#elif defined(__APPLE__) +// functions for parsing X font names: +FL_EXPORT const char* fl_font_word(const char *p, int n); +FL_EXPORT char *fl_find_fontsize(char *name); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: do you need additional functions for font handling?" +#else // functions for parsing X font names: FL_EXPORT const char* fl_font_word(const char *p, int n); FL_EXPORT char *fl_find_fontsize(char *name); diff --git a/src/Fl_Gl_Choice.H b/src/Fl_Gl_Choice.H index 2d5e2fcb9..69d388607 100644 --- a/src/Fl_Gl_Choice.H +++ b/src/Fl_Gl_Choice.H @@ -45,6 +45,12 @@ #ifndef Fl_Gl_Choice_H #define Fl_Gl_Choice_H +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to list and select OpenGL drawing contexts" +#else +#endif + // Warning: whatever GLContext is defined to must take exactly the same // space in a structure as a void*!!! #ifdef WIN32 @@ -77,6 +83,8 @@ public: PIXELFORMATDESCRIPTOR pfd; // some wgl calls need this thing #elif defined(__APPLE_QUARTZ__) NSOpenGLPixelFormat* pixelformat; +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: define OpenGL pixel format containers" #else XVisualInfo *vis; // the visual to use Colormap colormap; // a colormap for that visual @@ -97,6 +105,10 @@ GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0); GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0); +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: define fl_create_gl_context function" + #else GLContext fl_create_gl_context(XVisualInfo* vis); diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index edb0843f2..1af0b355d 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -27,6 +27,12 @@ # include "flstring.h" # include <FL/fl_utf8.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to list and select OpenGL drawing contexts" +#else +#endif + # ifdef WIN32 void fl_save_dc(HWND, HDC); #elif defined(__APPLE__) diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index 94c355349..a7dfcd0a6 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -23,6 +23,12 @@ #include <FL/Fl_RGB_Image.H> #include "FL/Fl.H" +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement code to read OpenGL renderings into RGB maps" +#else +#endif + #if defined(__APPLE__) uchar *convert_BGRA_to_RGB(uchar *baseAddress, int w, int h, int mByteWidth) { diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index 76d532b89..204a0796e 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -25,6 +25,12 @@ #include <FL/Fl_Gl_Window.H> #include <stdlib.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement OpenGL hardware overlays if they are availbale in a compatible way. This is rarely needed." +#else +#endif + #if !HAVE_GL_OVERLAY int Fl_Gl_Window::can_do_overlay() {return 0;} diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 46e7ebbb7..02d238332 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -32,6 +32,12 @@ extern int fl_gl_load_plugin; #include <stdlib.h> #include <FL/fl_utf8.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the creation and destruction of OpenGL surfaces" +#else +#endif + //////////////////////////////////////////////////////////////// // The symbol SWAP_TYPE defines what is in the back buffer after doing diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 8891c7fb7..cc28fdb89 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -25,6 +25,12 @@ #include <FL/Fl_Printer.H> #include "flstring.h" +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement RGB image handling here" +#else +#endif + #ifdef WIN32 void fl_release_dc(HWND, HDC); // from Fl_win32.cxx #endif diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 347ce3a2a..c7303fb27 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -20,6 +20,11 @@ #include <FL/Fl_Printer.H> #include <FL/Fl.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement image surface handling here" +#else +#endif const char *Fl_Image_Surface::class_id = "Fl_Image_Surface"; diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index a7232117e..ae46e7797 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -22,6 +22,13 @@ // In theory you can replace this code with another subclass to change // the keybindings. +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement text input specifics here" + // current custom code is for OS X keybaord specifics only +#else +#endif + #include <stdio.h> #include <stdlib.h> #include <FL/Fl.H> diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index f7d739889..9f926d83e 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -27,6 +27,13 @@ #include <stdlib.h> #include <ctype.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: manage character composing here" +#else +#endif + + #define MAXBUF 1024 #if defined(USE_X11) && !USE_XFT const int secret_char = '*'; // asterisk to hide secret input diff --git a/src/Fl_Native_File_Chooser.cxx b/src/Fl_Native_File_Chooser.cxx index 7aa1d799b..37fa49dfc 100644 --- a/src/Fl_Native_File_Chooser.cxx +++ b/src/Fl_Native_File_Chooser.cxx @@ -19,15 +19,16 @@ // Use Windows' chooser #ifdef WIN32 #include "Fl_Native_File_Chooser_WIN32.cxx" -#endif // Use Apple's chooser -#ifdef __APPLE__ +#elif defined(__APPLE__) #include <FL/Fl_Native_File_Chooser.H> -#endif + +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the native file chooser interface" // All else falls back to FLTK's own chooser -#if ! defined(__APPLE__) && !defined(WIN32) +#else #include "Fl_Native_File_Chooser_FLTK.cxx" #endif diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 30d51d5a9..2953727bf 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -32,6 +32,12 @@ #include <FL/Fl_Pixmap.H> #include <FL/Fl_Printer.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: this file needs a lot of custom code to draw Pixmaps correctly" +#else +#endif + #if defined(USE_X11) # if HAVE_X11_XREGION_H # include <X11/Xregion.h> diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index 90b7820fd..47c842f66 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -29,6 +29,12 @@ #include <sys/stat.h> #include <time.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement some file storage in a designated place" +#else +#endif + #if defined(WIN32) && !defined(__CYGWIN__) # include <windows.h> # include <direct.h> diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx index be081ad7d..e04c3b97e 100644 --- a/src/Fl_Printer.cxx +++ b/src/Fl_Printer.cxx @@ -19,6 +19,12 @@ #include <FL/Fl_Printer.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the printer device specifics" +#else +#endif + #if defined(WIN32) #include "Fl_GDI_Printer.cxx" #endif diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index d747b1c2c..c5c8b7b61 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -31,6 +31,12 @@ #include <FL/Fl_Text_Display.H> #include <FL/Fl_Window.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: look out for some code that visualizes character composing" +#else +#endif + #undef min #undef max diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index 891f162bf..1a8288bfb 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -25,6 +25,11 @@ #include <FL/Fl_Text_Editor.H> #include <FL/fl_ask.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add common shortcut for your platform here" +#else +#endif /* Keyboard Control Matrix diff --git a/src/Fl_Window_iconize.cxx b/src/Fl_Window_iconize.cxx index 3d9546c85..73dc0edfc 100644 --- a/src/Fl_Window_iconize.cxx +++ b/src/Fl_Window_iconize.cxx @@ -29,6 +29,8 @@ void Fl_Window::iconize() { ShowWindow(i->xid, SW_SHOWMINNOACTIVE); #elif defined(__APPLE__) i->collapse(); +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to iconify a window" #else XIconifyWindow(fl_display, i->xid, fl_screen); #endif diff --git a/src/Fl_Window_shape.cxx b/src/Fl_Window_shape.cxx index c838eab0f..ff36eac13 100644 --- a/src/Fl_Window_shape.cxx +++ b/src/Fl_Window_shape.cxx @@ -24,6 +24,12 @@ #include <FL/Fl_Pixmap.H> #include <string.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to implement arbitrarily shaped windows" +#else +#endif + #ifdef WIN32 # include <malloc.h> // needed for VisualC2010 #elif !defined(__APPLE__) diff --git a/src/Fl_abort.cxx b/src/Fl_abort.cxx index c1b121408..fc2e40541 100644 --- a/src/Fl_abort.cxx +++ b/src/Fl_abort.cxx @@ -26,6 +26,12 @@ #include <stdarg.h> #include "flstring.h" +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: use native message box below if one is available" +#else +#endif + #ifdef WIN32 # include <windows.h> diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx index 184f52fc9..1fec33b69 100644 --- a/src/Fl_arg.cxx +++ b/src/Fl_arg.cxx @@ -29,6 +29,12 @@ #include "flstring.h" #if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement special command line handling" +#else +#endif + +#if defined(WIN32) || defined(__APPLE__) int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*); # define NoValue 0x0000 # define XValue 0x0001 diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index 646be1b71..b10b0b72f 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -21,6 +21,11 @@ Utility functions to support text input. */ +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement keyboard composing in the code below" +#else +#endif #include <FL/Fl.H> #include <FL/x.H> diff --git a/src/Fl_display.cxx b/src/Fl_display.cxx index fd942d8a3..dc179b0b6 100644 --- a/src/Fl_display.cxx +++ b/src/Fl_display.cxx @@ -32,6 +32,8 @@ void Fl::display(const char *d) { #if defined(__APPLE__) || defined(WIN32) (void)d; +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: initiate a connection to the display" #else static char e[1024]; strcpy(e,"DISPLAY="); diff --git a/src/Fl_get_key.cxx b/src/Fl_get_key.cxx index 4e7d6c649..af7117fdf 100644 --- a/src/Fl_get_key.cxx +++ b/src/Fl_get_key.cxx @@ -20,6 +20,8 @@ # include "Fl_get_key_win32.cxx" #elif defined(__APPLE__) # include "Fl_get_key_mac.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement keyboard reading and interpretation in its own file" #else // Return the current state of a key. This is the X version. I identify diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index c0385d53f..2c628f88b 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -200,6 +200,10 @@ void Fl::get_system_colors() #endif } +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement code to find the current desktop color scheme" + #else // --- X11 --- // Read colors that KDE writes to the xrdb database. diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx index c8f7ac941..9b0446d74 100644 --- a/src/Fl_grab.cxx +++ b/src/Fl_grab.cxx @@ -30,6 +30,12 @@ extern void fl_fix_focus(); // in Fl.cxx +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: tell a window to grab all following events" +#else +#endif + #ifdef WIN32 // We have to keep track of whether we have captured the mouse, since // MSWindows shows little respect for this... Grep for fl_capture to diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index bef9d972d..fc6daf8b9 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -389,6 +389,10 @@ void lock_ring() { pthread_mutex_lock(ring_mutex); } +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement simple locking and unlocking for basic multithreading support" + #else void unlock_ring() { diff --git a/src/Fl_own_colormap.cxx b/src/Fl_own_colormap.cxx index 1c57870b3..d9eee2bb2 100644 --- a/src/Fl_own_colormap.cxx +++ b/src/Fl_own_colormap.cxx @@ -45,6 +45,11 @@ void Fl::own_colormap() {} // MacOS X always provides a TrueColor interface... void Fl::own_colormap() {} + +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: implement color map handling if you don;t have an RGB screen" + #else // X version diff --git a/src/Fl_visual.cxx b/src/Fl_visual.cxx index c9df1a19a..75dc2cbc8 100644 --- a/src/Fl_visual.cxx +++ b/src/Fl_visual.cxx @@ -73,6 +73,9 @@ int Fl::visual(int flags) { return 1; } +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to handle RGB and color index visuals" + #else #if USE_XDBE diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 7bb8761f2..5422735b5 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -20,6 +20,8 @@ //# include "Fl_win32.cxx" #elif defined(__APPLE__) //# include "Fl_mac.cxx" // now Fl_cocoa.mm +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement the FLTK core in its own file" #elif !defined(FL_DOXYGEN) # define CONSOLIDATE_MOTION 1 diff --git a/src/filename_ext.cxx b/src/filename_ext.cxx index dc68b302d..406420e07 100644 --- a/src/filename_ext.cxx +++ b/src/filename_ext.cxx @@ -20,6 +20,13 @@ #include <FL/filename.H> +#ifdef WIN32 +#elif defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement directory and filename handling for your platfomr if needed" +#else // X11 +#endif + /** Gets the extensions of a filename. \code #include <FL/filename.H> diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx index 492938ffd..e27c0ee37 100644 --- a/src/filename_isdir.cxx +++ b/src/filename_isdir.cxx @@ -25,6 +25,12 @@ #include <FL/filename.H> #include <FL/fl_utf8.h> +#ifdef WIN32 +#elif defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement directory and filename handling for your platfomr if needed" +#else // X11 +#endif #if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__) static inline int isdirsep(char c) {return c=='/' || c=='\\';} diff --git a/src/filename_list.cxx b/src/filename_list.cxx index 4b811795f..d65ddcdd3 100644 --- a/src/filename_list.cxx +++ b/src/filename_list.cxx @@ -26,6 +26,13 @@ #include <FL/x.H> #endif +#ifdef WIN32 +#elif defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement directory and filename handling for your platfomr if needed" +#else // X11 +#endif + extern "C" { #ifndef HAVE_SCANDIR int fl_scandir (const char *dir, dirent ***namelist, diff --git a/src/fl_arci.cxx b/src/fl_arci.cxx index 13ce0240d..ac3b839fb 100644 --- a/src/fl_arci.cxx +++ b/src/fl_arci.cxx @@ -69,6 +69,7 @@ void Fl_Graphics_Driver::arc(int x,int y,int w,int h,double a1,double a2) { CGContextStrokePath(fl_gc); CGContextSetShouldAntialias(fl_gc, false); #else +# pragma message "FL_PORTING: implement arc drawing" # error unsupported platform #endif } @@ -114,6 +115,7 @@ void Fl_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) { CGContextFillPath(fl_gc); CGContextSetShouldAntialias(fl_gc, false); #else +# pragma message "FL_PORTING: implement pie drawing (mmmh, apple pie)" # error unsupported platform #endif } diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index b24a1762b..ce61a2796 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -309,6 +309,8 @@ void fl_beep(int type) { default : break; } +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement beeping or other noise generating functions" #else switch (type) { case FL_BEEP_DEFAULT : diff --git a/src/fl_call_main.c b/src/fl_call_main.c index f32122a20..1d4b8c1c0 100644 --- a/src/fl_call_main.c +++ b/src/fl_call_main.c @@ -37,6 +37,12 @@ * Microsoft(r) Windows(r) that allows for it. */ +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement 'main()' here if your platform provides another app entry point" +#else +#endif + #if defined(WIN32) && !defined(FL_DLL) && !defined (__GNUC__) # include <windows.h> diff --git a/src/fl_color.cxx b/src/fl_color.cxx index 6b03bb159..38e09242e 100644 --- a/src/fl_color.cxx +++ b/src/fl_color.cxx @@ -27,6 +27,8 @@ # include "fl_color_win32.cxx" #elif defined(__APPLE__) # include "fl_color_mac.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement color handling in your own file based on fl_color.cxx" #else // Also code to look at the X visual and figure out the best way to turn diff --git a/src/fl_dnd.cxx b/src/fl_dnd.cxx index 4da6c91a2..cee05eab5 100644 --- a/src/fl_dnd.cxx +++ b/src/fl_dnd.cxx @@ -20,6 +20,8 @@ # include "fl_dnd_win32.cxx" #elif defined(__APPLE__) //# include "fl_dnd_mac.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement drag and drop in its own platform file" #else # include "fl_dnd_x.cxx" #endif diff --git a/src/fl_draw_image.cxx b/src/fl_draw_image.cxx index 8c17f010f..7312061c5 100644 --- a/src/fl_draw_image.cxx +++ b/src/fl_draw_image.cxx @@ -30,6 +30,8 @@ # include "fl_draw_image_win32.cxx" #elif defined(__APPLE__) # include "fl_draw_image_mac.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement image drawing in its own file" #else // A list of assumptions made about the X display: diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index ff5f1985f..a5b29e4b7 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -38,6 +38,12 @@ #include <stdio.h> #include "flstring.h" +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement platform specific about pixmap drawing here" +#else +#endif + static int ncolors, chars_per_pixel; /** diff --git a/src/fl_font.cxx b/src/fl_font.cxx index 26960e081..f8feba035 100644 --- a/src/fl_font.cxx +++ b/src/fl_font.cxx @@ -51,6 +51,8 @@ # include "fl_font_mac.cxx" #elif USE_XFT # include "fl_font_xft.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement font handling specific in its own file" #else # include "fl_font_x.cxx" #endif // WIN32 diff --git a/src/fl_line_style.cxx b/src/fl_line_style.cxx index 40274d314..14965e4fd 100644 --- a/src/fl_line_style.cxx +++ b/src/fl_line_style.cxx @@ -155,6 +155,7 @@ void Fl_Graphics_Driver::line_style(int style, int width, char* dashes) { } fl_quartz_restore_line_style_(); #else +# pragma message "FL_PORTING: implement line styles here" # error unsupported platform #endif } diff --git a/src/fl_open_uri.cxx b/src/fl_open_uri.cxx index d25b5b9a9..bfc31355f 100644 --- a/src/fl_open_uri.cxx +++ b/src/fl_open_uri.cxx @@ -142,6 +142,9 @@ fl_open_uri(const char *uri, char *msg, int msglen) { return run_program("/usr/bin/open", argv, msg, msglen) != 0; +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add code to open any file type with an external app" + #else // !WIN32 && !__APPLE__ // Run any of several well-known commands to open the URI. // diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx index 89ff3e49e..f42fc6804 100644 --- a/src/fl_read_image.cxx +++ b/src/fl_read_image.cxx @@ -25,6 +25,12 @@ # include <stdio.h> #endif // DEBUG +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement code to read RGB data from screen" +#else +#endif + #if defined(__APPLE__) # include "fl_read_image_mac.cxx" #else diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index ff217db34..29d36abce 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -33,6 +33,12 @@ #include <FL/fl_draw.H> #include <FL/x.H> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement al the line drawing functions below" +#else +#endif + // fl_line_width_ must contain the absolute value of the current // line width to be used for X11 clipping (see below). // This is defined in src/fl_line_style.cxx diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx index eecf1847a..3203e2c60 100644 --- a/src/fl_scroll_area.cxx +++ b/src/fl_scroll_area.cxx @@ -151,6 +151,7 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy, CFRelease(img); } #else +# pragma message "FL_PORTING: implement scrolling of the screen contents" # error unsupported platform #endif if (dx) draw_area(data, clip_x, dest_y, clip_w, src_h); diff --git a/src/fl_set_fonts.cxx b/src/fl_set_fonts.cxx index 000d5701a..2673a78fd 100644 --- a/src/fl_set_fonts.cxx +++ b/src/fl_set_fonts.cxx @@ -28,6 +28,8 @@ # include "fl_set_fonts_mac.cxx" #elif USE_XFT # include "fl_set_fonts_xft.cxx" +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement changes in font in its own file" #else # include "fl_set_fonts_x.cxx" #endif // WIN32 diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index f9defc2f9..dc346c46f 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -42,6 +42,12 @@ #include <FL/x.H> #endif +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement keyboard shortcut handling here" +#else +#endif + /** Tests the current event, which must be an FL_KEYBOARD or FL_SHORTCUT, against a shortcut value (described in Fl_Button). diff --git a/src/fl_utf.c b/src/fl_utf.c index 46d13959d..d81ba983d 100644 --- a/src/fl_utf.c +++ b/src/fl_utf.c @@ -22,6 +22,12 @@ #include <string.h> #include <stdlib.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: llok out for some unicode functions here. Default should be fine though." +#else +#endif + /** \addtogroup fl_unicode @{ */ diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx index d1ce2d80c..e1375d84f 100644 --- a/src/fl_utf8.cxx +++ b/src/fl_utf8.cxx @@ -21,6 +21,12 @@ #include <FL/filename.H> #include <stdarg.h> +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: verify code for utf8 handling" +#else +#endif + #if defined(WIN32) || defined(__CYGWIN__) # include <ctype.h> # include <io.h> diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index d665ae4e4..c44178eba 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -28,6 +28,12 @@ // matt: the Quartz implementation purposely doesn't use the Quartz matrix // operations for reasons of compatibility and maintainability +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement functions below for vector drawing" +#else +#endif + #include <config.h> #include <FL/fl_draw.H> #include <FL/x.H> diff --git a/src/forms_timer.cxx b/src/forms_timer.cxx index 39da25403..bf8b526d9 100644 --- a/src/forms_timer.cxx +++ b/src/forms_timer.cxx @@ -52,6 +52,8 @@ void fl_gettime(long* sec, long* usec) { *sec = (long) tp.time; *usec = tp.millitm * 1000; # endif +#elif defined(FL_PORTING) && !defined(__APPLE__) +# pragma message "FL_PORTING: implement time, rarely needed, if ever." #else struct timeval tp; struct timezone tzp; diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 1c31f4174..2d501e741 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -19,6 +19,12 @@ // Functions from <FL/gl.h> // See also Fl_Gl_Window and gl_start.cxx +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement OpenGL text rendering here" +#else +#endif + #include "flstring.h" #if HAVE_GL || defined(FL_DOXYGEN) diff --git a/src/gl_start.cxx b/src/gl_start.cxx index 7e2bee25c..0ea02b1d1 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -28,6 +28,12 @@ // be erased when the buffers are swapped (when double buffer hardware // is being used) +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: if possible, add OpenGL rendering in non-OpenGL contexts" +#else +#endif + #include <config.h> #if HAVE_GL diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx index f470ec3eb..3cf2be42b 100644 --- a/src/screen_xywh.cxx +++ b/src/screen_xywh.cxx @@ -142,6 +142,10 @@ static void screen_init() { num_screens = count; } +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: return various information about the screens in the system" + #else #if HAVE_XINERAMA diff --git a/src/xutf8/is_right2left.c b/src/xutf8/is_right2left.c index 69a612a48..19685ad5c 100644 --- a/src/xutf8/is_right2left.c +++ b/src/xutf8/is_right2left.c @@ -14,6 +14,12 @@ * http://www.fltk.org/str.php */ +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: utf8 functionality" +#else +#endif + /* * This file is required on all platforms for utf8 support */ diff --git a/src/xutf8/lcUniConv/cp936ext.h b/src/xutf8/lcUniConv/cp936ext.h index e41db3f5d..765a15a8b 100644 --- a/src/xutf8/lcUniConv/cp936ext.h +++ b/src/xutf8/lcUniConv/cp936ext.h @@ -16,7 +16,15 @@ * http://www.fltk.org/str.php */ -#if !defined(WIN32) && !defined(__APPLE__) +#if defined(WIN32) || defined(__APPLE__) + + // not needed + +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: include the character encoding file below if needed" + +#else #ifndef CP936 #ifdef NEED_TOWC diff --git a/src/xutf8/utf8Utils.c b/src/xutf8/utf8Utils.c index 54bbccf4c..17d49d34c 100644 --- a/src/xutf8/utf8Utils.c +++ b/src/xutf8/utf8Utils.c @@ -14,6 +14,12 @@ * http://www.fltk.org/str.php */ +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: utf8" +#else +#endif + /* * Unicode to UTF-8 conversion functions. */ diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c index 7b52c0e5e..32619fe0a 100644 --- a/src/xutf8/utf8Wrap.c +++ b/src/xutf8/utf8Wrap.c @@ -14,6 +14,12 @@ * http://www.fltk.org/str.php */ +#if defined(WIN32) || defined(__APPLE__) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: utf8" +#else +#endif + /* * X11 UTF-8 text drawing functions. */ |
