Mikko L kirjoitti:
Hi all!

I haven't been able to work w/ FLTK for a while, but recently my company decided to use FLTK for our new product.

So, I ported FLTK1 to windows CE. Porting was pretty easy, only one day work, I expected more :) It works quite well already, even though there's still some things missing. For example some drawing code like Arc, Pie & friends doesn't work yet.

I saw some time ago lot's of interest for windows CE port, maybe some one find this useful.
I attached patch that contains code for port.

This patch allows also compile FLTK for UNICODE enabled visual studio, then it makes use of MS WCHAR enabled functions only. This makes it very easy to port UTF-8 later, atleast on windows port point of view ;)

If there's interest we could merge this to the FLTK1? 1.1.9? 1.2.0?
IMO, we could merge it straight after 1.1.8 to somewhere, I just don't know which version is going to be developed after that :)

BR,
Mikko Lähteenmäki


Forgot to include config.h in the patch..


Index: config.h
===================================================================
--- config.h    (revision 5857)
+++ config.h    (working copy)
@@ -26,10 +26,14 @@
 /*
  * Where to find files...
  */
+#ifndef _WIN32_WCE
+#  define FLTK_DATADIR "C:/FLTK"
+#  define FLTK_DOCDIR  "C:/FLTK/DOC"
+#else
+#  define FLTK_DATADIR "/FLTK"
+#  define FLTK_DOCDIR  "/FLTK/DOC"
+#endif
 
-#define FLTK_DATADIR   "C:/FLTK"
-#define FLTK_DOCDIR    "C:/FLTK/DOC"
-
 /*
  * BORDER_WIDTH:
  *
@@ -48,9 +52,12 @@
  * Do you have OpenGL? Set this to 0 if you don't have or plan to use
  * OpenGL, and FLTK will be smaller.
  */
+#ifndef _WIN32_WCE
+#  define HAVE_GL 1
+#else
+#  define HAVE_GL 0
+#endif
 
-#define HAVE_GL 1
-
 /*
  * HAVE_GL_GLU_H:
  *
@@ -66,9 +73,11 @@
  * Setting this to zero will save a good deal of code (especially for
  * fl_draw_image), but FLTK will only work on TrueColor visuals.
  */
-
-#define USE_COLORMAP 1
-
+#ifdef _WIN32_WCE
+#  define USE_COLORMAP 0
+#else
+#  define USE_COLORMAP 1
+#endif
 /*
  * HAVE_XDBE:
  *
@@ -155,10 +164,11 @@
 /*
  * Do we have POSIX locale support?
  */
+#ifndef _WIN32_WCE
+#  define HAVE_LOCALE_H 1
+#  define HAVE_LOCALECONV 1
+#endif
 
-#define HAVE_LOCALE_H 1
-#define HAVE_LOCALECONV 1
-
 /*
  * HAVE_POLL:
  *
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to