diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-01-03 22:54:29 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-01-03 22:54:29 +0000 |
| commit | acf6c881d36b675d755433d3cf48613bc46ed78d (patch) | |
| tree | 13cebc8f8fd918767595da12fafb5a600db2feb3 /FL/Fl_Device.H | |
| parent | 933b00b9c9fe55d01a7f1c4831f171482806f85b (diff) | |
Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Device.H')
| -rw-r--r-- | FL/Fl_Device.H | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index cd923c412..97266c391 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -57,6 +57,11 @@ typedef float COORD_T; typedef struct { float x; float y; } QPoint; # define XPOINT QPoint extern float fl_quartz_line_width_; +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: define types for COORD_T and XPOINT" +typedef int COORD_T; // default if not ported +typedef struct { int x; int y; } QPoint; +# define XPOINT QPoint #else typedef short COORD_T; # define XPOINT XPoint @@ -131,6 +136,13 @@ private: #ifdef WIN32 int numcount; int counts[20]; +#elif defined(__APPLE__) + // not needed +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: define variables for Fl_Graphics_Driver if needed." + // not needed +#else + // not needed in X11 #endif Fl_Font_Descriptor *font_descriptor_; void transformed_vertex0(COORD_T x, COORD_T y); @@ -166,6 +178,12 @@ protected: friend void fl_draw(const char *str, int n, int x, int y); #ifdef __APPLE__ friend void fl_draw(const char *str, int n, float x, float y); +#elif defined(WIN32) + // not needed +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add floating point text positioning if your platform supports it" +#else + // not needed #endif friend void fl_draw(int angle, const char *str, int n, int x, int y); friend void fl_rtl_draw(const char *str, int n, int x, int y); @@ -251,6 +269,12 @@ protected: virtual void draw(const char *str, int n, int x, int y) {} #ifdef __APPLE__ virtual void draw(const char *str, int n, float x, float y) { draw(str, n, (int)(x+0.5), (int)(y+0.5));} +#elif defined(WIN32) + // not needed +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: add floating point text positioning if your platform supports it" +#else + // not needed #endif /** \brief see fl_draw(int angle, const char *str, int n, int x, int y). */ virtual void draw(int angle, const char *str, int n, int x, int y) {} @@ -412,7 +436,9 @@ public: virtual ~Fl_Graphics_Driver() { if (p) free(p); } }; -#if defined(__APPLE__) || defined(FL_DOXYGEN) + +#if defined(__APPLE__) + /** \brief The Mac OS X-specific graphics class. * @@ -449,8 +475,9 @@ public: #endif void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); }; -#endif -#if defined(WIN32) || defined(FL_DOXYGEN) + +#elif defined(WIN32) || defined(FL_DOXYGEN) + /** \brief The MSWindows-specific graphics class. * @@ -497,8 +524,13 @@ public: void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy); int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP); }; -#endif -#if !(defined(__APPLE__) || defined(WIN32)) + +#elif defined(FL_PORTING) + +# pragma message "FL_PORTING: define a native graphics driver Fl_xxx_Graphics_Driver" + +#else // X11 + /** \brief The Xlib-specific graphics class. * @@ -531,6 +563,7 @@ public: void copy_offscreen_with_alpha(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); #endif }; + #endif /** @@ -590,6 +623,10 @@ class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device { friend class Fl_Graphics_Driver; static bool high_res_window_; //< true when drawing to a window of a retina display (Mac OS X only) static bool high_resolution() {return high_res_window_;} +#elif defined(WIN32) +#elif defined(FL_PORTING) +# pragma message "FL_PORTING: implement functions for extra high res drawing if your platform supports it" +#else #endif public: static const char *class_id; |
