summaryrefslogtreecommitdiff
path: root/FL/Fl_System_Driver.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-30 13:59:55 +0000
committerManolo Gouy <Manolo>2016-03-30 13:59:55 +0000
commit288ed8988e349fc04e47b4138029c5bf9cda3f2e (patch)
tree2a06865845bc2f5989b6bba1c5ffab6e8a1bddb4 /FL/Fl_System_Driver.H
parent53aced3dbdb75242ec0e1fa1568e59e98c03f067 (diff)
Rewrite fl_utf.c under the driver model: the file disappears and its content is moved to fl_utf8.cxx
All functions of fl_utf.c keep their C API in fl_utf8.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_System_Driver.H')
-rw-r--r--FL/Fl_System_Driver.H9
1 files changed, 9 insertions, 0 deletions
diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H
index a6ba67298..0588a3b89 100644
--- a/FL/Fl_System_Driver.H
+++ b/FL/Fl_System_Driver.H
@@ -96,6 +96,7 @@ public:
// the selected text during the D&D operation
virtual int dnd(int use_selection = 0) {return 0;}
+ // implement these to support cross-platform file operations
virtual char *utf2mbcs(const char *s) {return (char*)s;}
virtual char *getenv(const char* v);
virtual int open(const char* f, int oflags, int pmode) {return -1;}
@@ -110,6 +111,14 @@ public:
virtual int mkdir(const char* f, int mode) {return -1;}
virtual int rmdir(const char* f) {return -1;}
virtual int rename(const char* f, const char *n) {return -1;}
+
+ // the default implementation of these utf8... functions should be enough
+ virtual unsigned utf8towc(const char* src, unsigned srclen, wchar_t* dst, unsigned dstlen);
+ virtual unsigned utf8fromwc(char* dst, unsigned dstlen, const wchar_t* src, unsigned srclen);
+ virtual int utf8locale();
+ virtual unsigned utf8to_mb(const char* src, unsigned srclen, char* dst, unsigned dstlen);
+ virtual unsigned utf8from_mb(char* dst, unsigned dstlen, const char* src, unsigned srclen);
+
};
#endif // FL_SYSTEM_DRIVER_H