diff options
| author | Manolo Gouy <Manolo> | 2016-05-13 06:45:40 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-05-13 06:45:40 +0000 |
| commit | 207d8fe09b896cbcdcb4ea46ae6f06ce62b9001e (patch) | |
| tree | 3aa642288ba8768fa7080112f9fbae629997d7e8 /FL/platform_types.h | |
| parent | 01c5b06fa0a4c4bab0d9f0221439025e178bcbdf (diff) | |
Add GLContext to the set of platform-dependent types defined in FL/platform_types.h
If a platform does not support OpenGL, it can just typedef GLContext as void*
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11733 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/platform_types.h')
| -rw-r--r-- | FL/platform_types.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/FL/platform_types.h b/FL/platform_types.h index 17f0ad9ea..e0cd1c373 100644 --- a/FL/platform_types.h +++ b/FL/platform_types.h @@ -19,7 +19,7 @@ /* 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, GLContext, struct dirent, struct stat, fl_intptr_t, fl_uintptr_t NOTE: *FIXME* AlbrechtS 13 Apr 2016 (concerning FL_SOCKET) @@ -57,6 +57,13 @@ typedef struct CGContext* Fl_Offscreen; typedef struct CGImage* Fl_Bitmask; typedef struct flCocoaRegion* Fl_Region; typedef int FL_SOCKET; +#ifdef __OBJC__ + @class NSOpenGLContext; + typedef NSOpenGLContext* GLContext; +#elif defined(__cplusplus) + typedef class NSOpenGLContext* GLContext; +#endif // __OBJC__ + #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> @@ -73,6 +80,7 @@ typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */ # else typedef int FL_SOCKET; # endif +typedef struct HGLRC__ *GLContext; #include <sys/stat.h> struct dirent {char d_name[1];}; @@ -82,6 +90,7 @@ typedef void* Fl_Offscreen; typedef void* Fl_Bitmask; typedef void *Fl_Region; typedef int FL_SOCKET; +typedef void *GLContext; # pragma message "FL_PORTING: define struct dirent and implement scandir() for the platform" struct dirent {char d_name[1];}; # pragma message "FL_PORTING: define struct stat and implement stat() for the platform" @@ -98,6 +107,7 @@ typedef unsigned long Fl_Offscreen; typedef unsigned long Fl_Bitmask; typedef struct _XRegion *Fl_Region; typedef int FL_SOCKET; +typedef struct __GLXcontextRec *GLContext; #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> |
