Author: manolo
Date: 2011-02-02 03:29:18 -0800 (Wed, 02 Feb 2011)
New Revision: 8359
Log:
Removed global variable fl_display_device that was not very useful because
equivalent
to Fl_Display_Device::display_device().
Modified:
branches/branch-1.3/FL/Fl_Device.H
branches/branch-1.3/FL/win32.H
branches/branch-1.3/FL/x.H
branches/branch-1.3/src/Fl_Double_Window.cxx
branches/branch-1.3/src/Fl_cocoa.mm
branches/branch-1.3/src/Fl_win32.cxx
branches/branch-1.3/src/Fl_x.cxx
Modified: branches/branch-1.3/FL/Fl_Device.H
===================================================================
--- branches/branch-1.3/FL/Fl_Device.H 2011-02-02 09:55:47 UTC (rev 8358)
+++ branches/branch-1.3/FL/Fl_Device.H 2011-02-02 11:29:18 UTC (rev 8359)
@@ -46,8 +46,6 @@
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 @@
/**
@brief Returns the platform's display device.
*/
- static Fl_Display_Device *display_device() { return fl_display_device; };
+ static Fl_Display_Device *display_device();
};
/**
Modified: branches/branch-1.3/FL/win32.H
===================================================================
--- branches/branch-1.3/FL/win32.H 2011-02-02 09:55:47 UTC (rev 8358)
+++ branches/branch-1.3/FL/win32.H 2011-02-02 11:29:18 UTC (rev 8359)
@@ -136,7 +136,7 @@
# 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() \
Modified: branches/branch-1.3/FL/x.H
===================================================================
--- branches/branch-1.3/FL/x.H 2011-02-02 09:55:47 UTC (rev 8358)
+++ branches/branch-1.3/FL/x.H 2011-02-02 11:29:18 UTC (rev 8359)
@@ -90,7 +90,7 @@
// 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()
Modified: branches/branch-1.3/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Double_Window.cxx 2011-02-02 09:55:47 UTC
(rev 8358)
+++ branches/branch-1.3/src/Fl_Double_Window.cxx 2011-02-02 11:29:18 UTC
(rev 8359)
@@ -77,7 +77,7 @@
\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 @@
*/
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<stack_max) {
stack_gc[stack_ix] = fl_gc;
stack_window[stack_ix] = fl_window;
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-02-02 09:55:47 UTC (rev 8358)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-02-02 11:29:18 UTC (rev 8359)
@@ -98,9 +98,9 @@
static Fl_Quartz_Graphics_Driver fl_quartz_driver;
static Fl_Display_Device fl_quartz_display(&fl_quartz_driver);
-FL_EXPORT Fl_Display_Device *fl_display_device =
(Fl_Display_Device*)&fl_quartz_display; // does not change
FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver =
(Fl_Graphics_Driver*)&fl_quartz_driver; // the current target device of
graphics operations
-FL_EXPORT Fl_Surface_Device *fl_surface =
(Fl_Surface_Device*)fl_display_device; // the current target surface of
graphics operations
+FL_EXPORT Fl_Surface_Device *fl_surface =
(Fl_Surface_Device*)&fl_quartz_display; // the current target surface of
graphics operations
+Fl_Display_Device *Fl_Display_Device::display_device() { return
&fl_quartz_display; };
// public variables
int fl_screen;
Modified: branches/branch-1.3/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_win32.cxx 2011-02-02 09:55:47 UTC (rev
8358)
+++ branches/branch-1.3/src/Fl_win32.cxx 2011-02-02 11:29:18 UTC (rev
8359)
@@ -86,9 +86,9 @@
static Fl_GDI_Graphics_Driver fl_gdi_driver;
static Fl_Display_Device fl_gdi_display(&fl_gdi_driver);
-FL_EXPORT Fl_Display_Device *fl_display_device =
(Fl_Display_Device*)&fl_gdi_display; // does not change
FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver =
(Fl_Graphics_Driver*)&fl_gdi_driver; // the current target driver of graphics
operations
-FL_EXPORT Fl_Surface_Device *fl_surface =
(Fl_Surface_Device*)fl_display_device; // the current target surface of
graphics operations
+FL_EXPORT Fl_Surface_Device *fl_surface = (Fl_Surface_Device*)&fl_gdi_display;
// the current target surface of graphics operations
+Fl_Display_Device *Fl_Display_Device::display_device() { return
&fl_gdi_display; };
// dynamic wsock dll handling api:
#if defined(__CYGWIN__) && !defined(SOCKET)
Modified: branches/branch-1.3/src/Fl_x.cxx
===================================================================
--- branches/branch-1.3/src/Fl_x.cxx 2011-02-02 09:55:47 UTC (rev 8358)
+++ branches/branch-1.3/src/Fl_x.cxx 2011-02-02 11:29:18 UTC (rev 8359)
@@ -53,9 +53,9 @@
static Fl_Xlib_Graphics_Driver fl_xlib_driver;
static Fl_Display_Device fl_xlib_display(&fl_xlib_driver);
-FL_EXPORT Fl_Display_Device *fl_display_device =
(Fl_Display_Device*)&fl_xlib_display; // does not change
FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver =
(Fl_Graphics_Driver*)&fl_xlib_driver; // the current target device of graphics
operations
-FL_EXPORT Fl_Surface_Device *fl_surface =
(Fl_Surface_Device*)fl_display_device; // the current target surface of
graphics operations
+FL_EXPORT Fl_Surface_Device *fl_surface =
(Fl_Surface_Device*)&fl_xlib_display; // the current target surface of graphics
operations
+Fl_Display_Device *Fl_Display_Device::display_device() { return
&fl_xlib_display; };
////////////////////////////////////////////////////////////////
// interface to poll/select call:
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit