diff options
| author | Manolo Gouy <Manolo> | 2016-03-28 09:25:11 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-28 09:25:11 +0000 |
| commit | 6284720098cb3682f950db427c95ac87c2a10b3c (patch) | |
| tree | dbcfaa3ff88b889c91856f79136a6e25cf7ca914 /src/drivers/Posix | |
| parent | 3dfec155adf812941e4478b210d1bee4dbd56c01 (diff) | |
Rewrite file src/Fl_arg.cxx under the driver model. Begin giving flesh to the Fl_System_Driver class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Posix')
| -rw-r--r-- | src/drivers/Posix/Fl_Posix_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Posix/Fl_Posix_System_Driver.cxx | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 9a1ca7d1d..c18e3be0e 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -41,6 +41,8 @@ class Fl_Posix_System_Driver : public Fl_System_Driver { public: + virtual void display_arg(const char *arg); + virtual int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*); }; #endif // FL_POSIX_SYSTEM_DRIVER_H diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index 886397b35..16c71f56e 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -17,8 +17,9 @@ // -#include "../../config_lib.h" #include "Fl_Posix_System_Driver.H" +#include <FL/Fl.H> + // Pointers you can use to change FLTK to a foreign language. // Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx @@ -27,6 +28,20 @@ const char* fl_local_ctrl = "Ctrl"; const char* fl_local_meta = "Meta"; const char* fl_local_shift = "Shift"; +Fl_System_Driver *Fl_System_Driver::driver() { + static Fl_System_Driver *d = new Fl_Posix_System_Driver(); + return d; +} + +void Fl_Posix_System_Driver::display_arg(const char *arg) { + Fl::display(arg); +} + +int Fl_Posix_System_Driver::XParseGeometry(const char* string, int* x, int* y, + unsigned int* width, unsigned int* height) { + return ::XParseGeometry(string, x, y, width, height); +} + // // End of "$Id$". // |
