diff options
| author | Manolo Gouy <Manolo> | 2014-12-17 09:04:01 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-12-17 09:04:01 +0000 |
| commit | 15d497ebdf00537678226679503303a4f7c77800 (patch) | |
| tree | 1f229e16443963a6233535777405a5b281cf4baa /FL | |
| parent | 00dd28afa4fbee63cc907d57f60b2c7d75355cfc (diff) | |
Apple-only changes to restore a layout of the Fl_X class identical to that in FLTK 1.3.3.
With true subwindows, several members of Fl_X became useless.
This change recycle two of them for new uses:
- Fl_Region subRegion is used as a pointer to a CGRect
- Fl_X *xidChildren is used to indicate the resolution of the display
containing a window
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/mac.H | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -125,11 +125,27 @@ public: Fl_Offscreen other_xid; // pointer for offscreen bitmaps (overlay window) Fl_Window *w; // FLTK window for Fl_Region region; - CGRect* subRect; // make sure subwindow remains inside its parent window - Fl_X *next; // linked tree to support subwindows +#if FLTK_ABI_VERSION >= 10304 + CGRect* subRect_; // make sure subwindow remains inside its parent window + CGRect* subRect() { return subRect_; } // getter + void subRect(CGRect *r) { subRect_ = r; } // setter +#else + Fl_Region subRegion; // for ABI compatibility, recycled to replace subRect_ + CGRect* subRect() { return (CGRect*)subRegion; } // getter + void subRect(CGRect *r) { subRegion = (Fl_Region)r; } // setter +#endif + Fl_X *next; // chain of mapped windows +#if FLTK_ABI_VERSION < 10304 + Fl_X *xidChildren; // useless with true subwindows, recycled to replace mapped_to_retina_ + Fl_X *xidNext; // useless with true subwindows +#endif +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + bool mapped_to_retina(); // is window mapped to retina display? + void mapped_to_retina(bool); // sets whether window is mapped to retina display +#endif + static void set_high_resolution(bool); int wait_for_expose; NSCursor *cursor; - bool mapped_to_retina; // true when window is mapped to a retina display static Fl_X* first; static Fl_X* i(const Fl_Window* w) {return w->i;} static int fake_X_wm(const Fl_Window*,int&,int&,int&,int&,int&); @@ -164,7 +180,13 @@ public: static int insertion_point_location(int *px, int *py, int *pheight); // computes window coordinates & height of insertion point static const int CoreText_threshold; // Mac OS version from which the Core Text API is used to display text static Fl_Fontdesc* calc_fl_fonts(void); // computes the fl_fonts global variable - static void set_high_resolution(bool); +private: +#if FLTK_ABI_VERSION >= 10304 + // stores whether window is mapped to retina display + unsigned mapped_to_retina_; +#else + bool subwindow; // for ABI compatibility, useless with true subwindows +#endif }; extern Window fl_window; |
