diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-02-13 12:57:00 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-02-13 12:57:00 +0000 |
| commit | 5d1df0e789c794b8040c5db0d84b03ae2b42fd8d (patch) | |
| tree | 4e99ebb978d30bf6c7138181489dd37ce435c310 /src/Fl.cxx | |
| parent | 8deac1e6baf7a016aabd3b6cb5ccffd7f09263cd (diff) | |
Details on PORTME items. Move fl_parse_color() to screen drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index f97d3a2d8..b3211f83b 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -60,7 +60,7 @@ #endif // DEBUG || DEBUG_WATCH #ifdef WIN32 -#elif defined(__APPLE__) // PORTME: window driver and main loop +#elif defined(__APPLE__) // PORTME: Fl_Screen_Driver - window driver and main loop #elif defined(FL_PORTING) # pragma message "FL_PORTING: implement global variables for your platform here" #else // X11 @@ -73,7 +73,7 @@ HBRUSH fl_brush_action(int action); void fl_cleanup_pens(void); void fl_release_dc(HWND,HDC); void fl_cleanup_dc_list(void); -#elif defined(__APPLE__) // PORTME: platform functions +#elif defined(__APPLE__) // PORTME: Fl_Screen_Driver - platform functions extern double fl_mac_flush_and_wait(double time_to_wait); #endif // WIN32 @@ -159,7 +159,7 @@ bool Fl::cfg_sys_win32 = 0; // // Globals... // -#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: platform text +#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: Fl_Screen_Driver - platform text const char *Fl_Mac_App_Menu::about = "About %@"; const char *Fl_Mac_App_Menu::print = "Print Front Window"; const char *Fl_Mac_App_Menu::services = "Services"; @@ -167,7 +167,7 @@ const char *Fl_Mac_App_Menu::hide = "Hide %@"; const char *Fl_Mac_App_Menu::hide_others = "Hide Others"; const char *Fl_Mac_App_Menu::show = "Show All"; const char *Fl_Mac_App_Menu::quit = "Quit %@"; -#endif // __APPLE__ // PORTME: platform text, system menu +#endif // __APPLE__ // PORTME: Fl_Screen_Driver - platform text, system menu #ifndef FL_DOXYGEN Fl_Widget *Fl::belowmouse_, *Fl::pushed_, @@ -341,7 +341,7 @@ int Fl::event_inside(const Fl_Widget *o) /*const*/ { // implementation in Fl_win32.cxx -#elif defined(__APPLE__) // PORTME: core stuff from screen, platform, and window driver +#elif defined(__APPLE__) // PORTME: Fl_Screen_Driver - core stuff from screen, platform, and window driver // implementation in Fl_cocoa.mm (was Fl_mac.cxx) @@ -644,7 +644,7 @@ double Fl::wait(double time_to_wait) { return fl_wait(time_to_wait); -#elif defined(__APPLE__) // PORTME: platform fl_wait +#elif defined(__APPLE__) // PORTME: Fl_Screen_Driver - platform fl_wait run_checks(); return fl_mac_flush_and_wait(time_to_wait); @@ -787,7 +787,7 @@ int Fl::check() { \endcode */ int Fl::ready() { -#if defined( WIN32 ) || defined(__APPLE__) // PORTME: platform timeouts +#if defined( WIN32 ) || defined(__APPLE__) // PORTME: Fl_System_Driver - platform timeouts // not used #elif defined(FL_PORTING) # pragma message "FL_PORTING: you may need to handle timers here." @@ -1071,7 +1071,7 @@ void Fl::focus(Fl_Widget *o) { if (!w1) w1 = o->window(); while (w1) { win=w1; w1=win->window(); } if (win) { -#ifdef __APPLE__ // PORTME: platform window focus +#ifdef __APPLE__ // PORTME: Fl_Window_Driver - platform window focus if (fl_xfocus != win) { Fl_X *x = Fl_X::i(win); if (x) x->set_key_window(); @@ -1210,9 +1210,7 @@ void fl_fix_focus() { } } -#if !(defined(WIN32) || defined(__APPLE__)) // PORTME: platform selection extern Fl_Widget *fl_selection_requestor; // from Fl_x.cxx -#endif // This function is called by ~Fl_Widget() and by Fl_Widget::deactivate() // and by Fl_Widget::hide(). It indicates that the widget does not want @@ -1228,15 +1226,7 @@ void fl_throw_focus(Fl_Widget *o) { #endif // DEBUG if (o->contains(Fl::pushed())) Fl::pushed_ = 0; -#ifdef WIN32 - // not used -#elif defined(__APPLE__) // PORTME: platform selection - // not used -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: platform specific code when deleting a window" -#else if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0; -#endif if (o->contains(Fl::belowmouse())) Fl::belowmouse_ = 0; if (o->contains(Fl::focus())) Fl::focus_ = 0; if (o == fl_xfocus) fl_xfocus = 0; @@ -1626,7 +1616,7 @@ extern void fl_destroy_xft_draw(Window); #endif void Fl_Window::hide() { -#ifdef WIN32 +#ifdef WIN32 // platform fix // STR#3079: if there remains a window and a non-modal window, and the window is deleted, // the app remains running without any apparent window. // Bug mechanism: hiding an owner window unmaps the owned (non-modal) window(s) @@ -1659,7 +1649,7 @@ void Fl_Window::hide() { Fl_X** pp = &Fl_X::first; for (; *pp != ip; pp = &(*pp)->next) if (!*pp) return; *pp = ip->next; -#ifdef __APPLE__ // PORTME: platform pointer handling +#ifdef __APPLE__ // platform fix // MacOS X manages a single pointer per application. Make sure that hiding // a toplevel window will not leave us with some random pointer shape, or // worst case, an invisible pointer @@ -1708,7 +1698,7 @@ void Fl_Window::hide() { if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0); # endif } -#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping +#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window unmapping Fl_X::q_release_context(ip); if ( ip->xid == fl_window ) fl_window = 0; @@ -1740,7 +1730,7 @@ void Fl_Window::hide() { } delete[] doit; } -#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping +#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window unmapping ip->destroy(); #elif defined(FL_PORTING) # pragma message "FL_PORTING: code to destroy a window on screen" @@ -1774,13 +1764,13 @@ int Fl_Window::handle(int ev) else { #if defined(USE_X11) || defined(WIN32) XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless -#elif defined(__APPLE_QUARTZ__) // PORTME: platform window mapping +#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window mapping i->map(); #elif defined(FL_PORTING) # pragma message "FL_PORTING: code to show a window on screen" #else # error unsupported platform -#endif // __APPLE__ // PORTME: platform window mapping +#endif // __APPLE__ // PORTME: Fl_Window_Driver - platform window mapping } break; case FL_HIDE: @@ -1798,7 +1788,7 @@ int Fl_Window::handle(int ev) } #if defined(USE_X11) || defined(WIN32) XUnmapWindow(fl_display, fl_xid(this)); -#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping, again +#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window unmapping, again i->unmap(); #elif defined(FL_PORTING) # pragma message "FL_PORTING: code to hide a window from screen" @@ -1966,7 +1956,7 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) { Fl_Region R = XRectangleRegion(X, Y, W, H); CombineRgn(i->region, i->region, R, RGN_OR); XDestroyRegion(R); -#elif defined(__APPLE_QUARTZ__) // PORTME: platform damage region +#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform damage region CGRect arg = fl_cgrectmake_cocoa(X, Y, W, H); int j; // don't add a rectangle totally inside the Fl_Region for(j = 0; j < i->region->count; j++) { |
