diff options
| author | Manolo Gouy <Manolo> | 2016-03-28 15:22:20 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-28 15:22:20 +0000 |
| commit | 28d1a2d6848d5abe555fd0ddae8b57cec6f900ca (patch) | |
| tree | bb17efad1d942a3fee09b0ef9e858677060e2230 /FL | |
| parent | 244a1a5bc439c0a3427e78f1dac9623b85f161bb (diff) | |
Rewrite Fl_abort.cxx under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_System_Driver.H | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index bf11d440c..819bd0cd8 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -25,6 +25,7 @@ #define FL_SYSTEM_DRIVER_H #include <FL/Fl_Export.H> +#include <stdarg.h> #ifdef __APPLE__ typedef struct CGContext* Fl_Offscreen; @@ -51,13 +52,14 @@ typedef struct _XRegion *Fl_Region; #endif // __APPLE__ /** - \brief A base class for platform specific window handling code. + \brief A base class for platform-specific system operations. */ class FL_EXPORT Fl_System_Driver { protected: Fl_System_Driver(); public: virtual ~Fl_System_Driver(); + // copy the implementation in Fl_XXX_System_Driver.cxx to the corresponding file for the new platform static Fl_System_Driver *driver(); static const int flNoValue; static const int flWidthValue; @@ -66,10 +68,23 @@ public: static const int flYValue; static const int flXNegative; static const int flYNegative; + // implement if the system adds unwanted program argument(s) virtual int single_arg(const char *arg) { return 0; } + // implement if the system adds unwanted program argument pair(s) virtual int arg_and_value(const char *name, const char *value) { return 0; } + // implement to process the -display argument virtual void display_arg(const char *arg) { } + // default implementation should be enough virtual int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*); + static void warning(const char* format, ...); + // implement to set the default effect of Fl::warning() + virtual void warning(const char* format, va_list args); + static void error(const char* format, ...); + // implement to set the default effect of Fl::error() + virtual void error(const char* format, va_list args); + static void fatal(const char* format, ...); + // implement to set the default effect of Fl::error() + virtual void fatal(const char* format, va_list args); }; #endif // FL_SYSTEM_DRIVER_H |
