summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-07-01 13:21:32 +0000
committerManolo Gouy <Manolo>2010-07-01 13:21:32 +0000
commit61eb9377c83d73c19e5561dc8561bb7d956e1ef9 (patch)
tree4edc6092899920b7f57d41c901555a47fdf73cf2 /src
parent737816b18b7b4b0f8f7292fd0f9a6ba26fa28f48 (diff)
Renamed global variable from fl_device to fl_graphics_driver to better express its class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Bitmap.cxx2
-rw-r--r--src/Fl_Device.cxx2
-rw-r--r--src/Fl_GDI_Printer.cxx2
-rw-r--r--src/Fl_Image.cxx2
-rw-r--r--src/Fl_Pixmap.cxx2
-rw-r--r--src/Fl_Quartz_Printer.mm2
-rw-r--r--src/Fl_cocoa.mm2
-rw-r--r--src/Fl_win32.cxx2
-rw-r--r--src/Fl_x.cxx2
-rw-r--r--src/fl_draw_pixmap.cxx2
-rw-r--r--src/fl_font_mac.cxx4
11 files changed, 12 insertions, 12 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index 0148b0156..163ae130f 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -249,7 +249,7 @@ Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *array)
}
void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+ fl_graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
}
static int start(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy,
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index a7315552b..9b65a8233 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -47,7 +47,7 @@ const char *Fl_Xlib_Graphics_Driver::device_type = "Fl_Xlib_Graphics_Driver";
/** \brief Use this drawing surface for future graphics requests. */
void Fl_Surface_Device::set_current(void)
{
- fl_device = _driver;
+ fl_graphics_driver = _driver;
fl_surface = this;
}
diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx
index a7fa9fea2..d2f9d1d59 100644
--- a/src/Fl_GDI_Printer.cxx
+++ b/src/Fl_GDI_Printer.cxx
@@ -37,7 +37,7 @@ extern HWND fl_window;
Fl_Printer::Fl_System_Printer(void) : Fl_Paged_Device() {
hPr = NULL;
type_ = device_type;
- driver(fl_device);
+ driver(fl_graphics_driver);
}
Fl_Printer::~Fl_System_Printer(void) {
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index 1c87699cc..2cb53ac68 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -434,7 +434,7 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
#endif // !WIN32 && !__APPLE_QUARTZ__
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+ fl_graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
}
static int start(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy,
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index 5440310f0..ef3dd5261 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -75,7 +75,7 @@ void Fl_Pixmap::measure() {
}
void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+ fl_graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
}
static int start(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy,
diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm
index 4bd15be58..80e5b5518 100644
--- a/src/Fl_Quartz_Printer.mm
+++ b/src/Fl_Quartz_Printer.mm
@@ -41,7 +41,7 @@ Fl_System_Printer::Fl_System_Printer(void)
y_offset = 0;
scale_x = scale_y = 1.;
type_ = device_type;
- driver(fl_device);
+ driver(fl_graphics_driver);
}
Fl_System_Printer::~Fl_System_Printer(void) {}
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 0b09774aa..6f4baaab0 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -120,7 +120,7 @@ static void cocoaMouseHandler(NSEvent *theEvent);
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_device = (Fl_Graphics_Driver*)&fl_quartz_driver; // the current target device of graphics operations
+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
// public variables
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 3ccfd3106..fb1f66b2a 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -98,7 +98,7 @@
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_device = (Fl_Graphics_Driver*)&fl_gdi_driver; // the current target driver of graphics operations
+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
// dynamic wsock dll handling api:
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index fc35a7597..ee437f1d4 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -54,7 +54,7 @@
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_device = (Fl_Graphics_Driver*)&fl_xlib_driver; // the current target device of graphics operations
+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
////////////////////////////////////////////////////////////////
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index e114e9b75..8ece16718 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -341,7 +341,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
#endif
#ifdef __APPLE_QUARTZ__
- if (fl_device->type() == Fl_Quartz_Graphics_Driver::device_type ) {
+ if (fl_graphics_driver->type() == Fl_Quartz_Graphics_Driver::device_type ) {
bool transparent = (transparent_index>=0);
transparent = true;
U32 *array = new U32[d.w * d.h], *q = array;
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx
index d7ac2dfcb..53ae93d74 100644
--- a/src/fl_font_mac.cxx
+++ b/src/fl_font_mac.cxx
@@ -425,8 +425,8 @@ static CGColorRef flcolortocgcolor(Fl_Color i)
void fl_draw(const char *str, int n, float x, float y) {
- if(fl_device->type() != Fl_Quartz_Graphics_Driver::device_type) {
- fl_device->draw(str, n, (int)x, (int)y );
+ if(fl_graphics_driver->type() != Fl_Quartz_Graphics_Driver::device_type) {
+ fl_graphics_driver->draw(str, n, (int)x, (int)y );
return;
}
// avoid a crash if no font has been selected by user yet !