From bb29437427d44ee47ab1039f0bab3b66fdb40b62 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 2 Feb 2011 11:29:18 +0000 Subject: [PATCH] Removed global variable fl_display_device that was not very useful because equivalent to Fl_Display_Device::display_device(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Device.H | 4 +--- FL/win32.H | 2 +- FL/x.H | 2 +- src/Fl_Double_Window.cxx | 4 ++-- src/Fl_cocoa.mm | 4 ++-- src/Fl_win32.cxx | 4 ++-- src/Fl_x.cxx | 4 ++-- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index 25b254266..f7c7fecbb 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -46,8 +46,6 @@ class Fl_Surface_Device; FL_EXPORT extern Fl_Graphics_Driver *fl_graphics_driver; /** \brief Points to the surface that currently receives all graphics requests */ FL_EXPORT extern Fl_Surface_Device *fl_surface; -/** \brief Points to the platform's display */ -FL_EXPORT extern Fl_Display_Device *fl_display_device; /** signature of image generation callback function. @@ -394,7 +392,7 @@ public: /** @brief Returns the platform's display device. */ - static Fl_Display_Device *display_device() { return fl_display_device; }; + static Fl_Display_Device *display_device(); }; /** diff --git a/FL/win32.H b/FL/win32.H index 27cfdc25e..cb19475df 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -136,7 +136,7 @@ typedef HBITMAP Fl_Offscreen; # define fl_begin_offscreen(b) \ HDC _sgc=fl_gc; Window _sw=fl_window; \ - Fl_Surface_Device *_ss = fl_surface; fl_display_device->set_current(); \ + Fl_Surface_Device *_ss = fl_surface; Fl_Display_Device::display_device()->set_current(); \ fl_gc=fl_makeDC(b); int _savedc = SaveDC(fl_gc); fl_window=(HWND)b; fl_push_no_clip() # define fl_end_offscreen() \ diff --git a/FL/x.H b/FL/x.H index c022246eb..587822baf 100644 --- a/FL/x.H +++ b/FL/x.H @@ -90,7 +90,7 @@ typedef ulong Fl_Offscreen; // begin/end are macros that save the old state in local variables: # define fl_begin_offscreen(pixmap) \ Window _sw=fl_window; fl_window=pixmap; \ - Fl_Surface_Device *_ss = fl_surface; fl_display_device->set_current(); \ + Fl_Surface_Device *_ss = fl_surface; Fl_Display_Device::display_device()->set_current(); \ fl_push_no_clip() # define fl_end_offscreen() \ fl_pop_clip(); fl_window = _sw; _ss->set_current() diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 9e24a85e4..b64f949cf 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -77,7 +77,7 @@ static void fl_copy_offscreen_to_display(int x, int y, int w, int h, Fl_Offscree \param srcx,srcy origin in offscreen buffer of rectangle to copy */ void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { - if( fl_graphics_driver == fl_display_device->driver()) { + if( fl_graphics_driver == Fl_Display_Device::display_device()->driver()) { fl_copy_offscreen_to_display(x, y, w, h, pixmap, srcx, srcy); } else { // when copy is not to the display @@ -279,7 +279,7 @@ static Fl_Surface_Device *_ss; */ void fl_begin_offscreen(Fl_Offscreen ctx) { _ss = fl_surface; - fl_display_device->set_current(); + Fl_Display_Device::display_device()->set_current(); if (stack_ix