summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Widget.H18
-rw-r--r--FL/platform_types.h32
2 files changed, 29 insertions, 21 deletions
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index fe978f125..ac42d3bf5 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -3,7 +3,7 @@
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2015 by Bill Spitzak and others.
+// Copyright 1998-2016 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -24,22 +24,6 @@
#include "Enumerations.H"
-/**
- \todo typedef's fl_intptr_t and fl_uintptr_t should be documented.
-*/
-#ifdef _WIN64
-#if defined(__GNUC__) || defined(__clang__)
-#include <stdint.h>
-#else
-#include <stddef.h> // M$VC
-#endif
-typedef intptr_t fl_intptr_t;
-typedef uintptr_t fl_uintptr_t;
-#else
-typedef long fl_intptr_t;
-typedef unsigned long fl_uintptr_t;
-#endif
-
class Fl_Widget;
class Fl_Window;
class Fl_Group;
diff --git a/FL/platform_types.h b/FL/platform_types.h
index 05b5737b8..17f0ad9ea 100644
--- a/FL/platform_types.h
+++ b/FL/platform_types.h
@@ -19,16 +19,39 @@
/* Platform-dependent types are defined here.
These types must be defined by any platform:
- Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, struct dirent, struct stat
+ Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, struct dirent, struct stat,
+ fl_intptr_t, fl_uintptr_t
NOTE: *FIXME* AlbrechtS 13 Apr 2016 (concerning FL_SOCKET)
----------------------------------------------------------
- The socket API is partially inconsistent because some of the methods
- use int explicitly, but the callback typedefs use FL_SOCKET. With the
+ The Fl::add_fd() API is partially inconsistent because some of the methods
+ explicitly use 'int', but the callback typedefs use FL_SOCKET. With the
definition of FL_SOCKET below we can have different data sizes and
different signedness of socket numbers on *some* platforms.
*/
+/**
+ \todo typedef's fl_intptr_t and fl_uintptr_t should be documented.
+*/
+#ifdef _WIN64
+
+#if defined(_MSC_VER)
+# include <stddef.h> /* M$VC */
+#else
+# include <stdint.h>
+#endif
+
+typedef intptr_t fl_intptr_t;
+typedef uintptr_t fl_uintptr_t;
+
+#else /* ! _WIN64 */
+
+typedef long fl_intptr_t;
+typedef unsigned long fl_uintptr_t;
+
+#endif /* _WIN64 */
+
+
#ifdef __APPLE__
typedef struct CGContext* Fl_Offscreen;
typedef struct CGImage* Fl_Bitmask;
@@ -69,7 +92,8 @@ struct stat { /* the FLTK source code uses part of the stat() API */
#define S_IFDIR 0040000 /* directory */
#define S_IFREG 0100000 /* regular */
-#else
+#else /* X11 */
+
typedef unsigned long Fl_Offscreen;
typedef unsigned long Fl_Bitmask;
typedef struct _XRegion *Fl_Region;