summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Bitmap.cxx2
-rw-r--r--src/Fl_Device.cxx14
-rw-r--r--src/Fl_Double_Window.cxx4
-rw-r--r--src/Fl_GDI_Printer.cxx2
-rw-r--r--src/Fl_Paged_Device.cxx2
-rw-r--r--src/Fl_Pixmap.cxx2
-rw-r--r--src/Fl_PostScript.cxx8
-rw-r--r--src/Fl_Printer.cxx6
-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_draw_image_win32.cxx2
-rw-r--r--src/fl_draw_pixmap.cxx2
-rw-r--r--src/fl_font_win32.cxx2
-rw-r--r--src/fl_line_style.cxx2
-rw-r--r--src/fl_rect.cxx6
16 files changed, 30 insertions, 30 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index c28e2a4d5..1c49dc530 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -304,7 +304,7 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP,
HDC tempdc;
int save;
BOOL use_print_algo = false;
- if (fl_surface->type() == Fl_Printer::device_type) {
+ if (fl_surface->class_name() == Fl_Printer::class_id) {
static HMODULE hMod = NULL;
if (!hMod) {
hMod = LoadLibrary("MSIMG32.DLL");
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 9b65a8233..d74ce11fb 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -29,18 +29,18 @@
#include <FL/Fl_Device.H>
#include <FL/Fl_Image.H>
-const char *Fl_Device::device_type = "Fl_Device";
-const char *Fl_Surface_Device::device_type = "Fl_Surface_Device";
-const char *Fl_Display_Device::device_type = "Fl_Display_Device";
-const char *Fl_Graphics_Driver::device_type = "Fl_Graphics_Driver";
+const char *Fl_Device::class_id = "Fl_Device";
+const char *Fl_Surface_Device::class_id = "Fl_Surface_Device";
+const char *Fl_Display_Device::class_id = "Fl_Display_Device";
+const char *Fl_Graphics_Driver::class_id = "Fl_Graphics_Driver";
#if defined(__APPLE__) || defined(FL_DOXYGEN)
-const char *Fl_Quartz_Graphics_Driver::device_type = "Fl_Quartz_Graphics_Driver";
+const char *Fl_Quartz_Graphics_Driver::class_id = "Fl_Quartz_Graphics_Driver";
#endif
#if defined(WIN32) || defined(FL_DOXYGEN)
-const char *Fl_GDI_Graphics_Driver::device_type = "Fl_GDI_Graphics_Driver";
+const char *Fl_GDI_Graphics_Driver::class_id = "Fl_GDI_Graphics_Driver";
#endif
#if !(defined(__APPLE__) || defined(WIN32))
-const char *Fl_Xlib_Graphics_Driver::device_type = "Fl_Xlib_Graphics_Driver";
+const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver";
#endif
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 1a91cee89..1df1da37c 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -180,8 +180,8 @@ void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int src
BOOL alpha_ok = 0;
// first try to alpha blend
// if to printer, always try alpha_blend
- int to_display = Fl_Surface_Device::surface()->type() == Fl_Display_Device::device_type; // true iff display output
- if ( (to_display && fl_can_do_alpha_blending()) || Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) {
+ int to_display = Fl_Surface_Device::surface()->class_name() == Fl_Display_Device::class_id; // true iff display output
+ if ( (to_display && fl_can_do_alpha_blending()) || Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) {
alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc);
}
// if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1
diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx
index d65efaddd..bcd1569ab 100644
--- a/src/Fl_GDI_Printer.cxx
+++ b/src/Fl_GDI_Printer.cxx
@@ -36,7 +36,7 @@ extern HWND fl_window;
Fl_System_Printer::Fl_System_Printer(void) : Fl_Paged_Device() {
hPr = NULL;
- type_ = device_type;
+ class_name(class_id);
driver(fl_graphics_driver);
}
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx
index 2b14b08cd..dd3e32dec 100644
--- a/src/Fl_Paged_Device.cxx
+++ b/src/Fl_Paged_Device.cxx
@@ -32,7 +32,7 @@
#include <FL/Fl.H>
#include <FL/fl_draw.H>
-const char *Fl_Paged_Device::device_type = "Fl_Paged_Device";
+const char *Fl_Paged_Device::class_id = "Fl_Paged_Device";
/**
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index a61796e53..18f533761 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -145,7 +145,7 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP
}
fl_end_offscreen();
}
- if (fl_surface->type() == Fl_Printer::device_type) {
+ if (fl_surface->class_name() == Fl_Printer::class_id) {
typedef BOOL (WINAPI* fl_transp_func) (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
static HMODULE hMod = NULL;
static fl_transp_func fl_TransparentBlt = NULL;
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx
index 5e98e899e..712cd3253 100644
--- a/src/Fl_PostScript.cxx
+++ b/src/Fl_PostScript.cxx
@@ -32,8 +32,8 @@
#include <FL/Fl_PostScript.H>
#include <FL/Fl_Native_File_Chooser.H>
-const char *Fl_PostScript_Graphics_Driver::device_type = "Fl_PostScript_Graphics_Driver";
-const char *Fl_PostScript_File_Device::device_type = "Fl_PostScript_File_Device";
+const char *Fl_PostScript_Graphics_Driver::class_id = "Fl_PostScript_Graphics_Driver";
+const char *Fl_PostScript_File_Device::class_id = "Fl_PostScript_File_Device";
/** \brief Label of the PostScript file chooser window */
const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file";
@@ -47,7 +47,7 @@ Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void)
lang_level_ = 2;
mask = 0;
ps_filename_ = NULL;
- type_ = device_type;
+ class_name(class_id);
scale_x = scale_y = 1.;
bg_r = bg_g = bg_b = 255;
}
@@ -62,7 +62,7 @@ Fl_PostScript_Graphics_Driver::~Fl_PostScript_Graphics_Driver() {
*/
Fl_PostScript_File_Device::Fl_PostScript_File_Device(void)
{
- type_ = device_type;
+ class_name(class_id);
#ifdef __APPLE__
gc = fl_gc; // the display context is used by fl_text_extents()
#endif
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index a1c33a661..3ed78a826 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -76,11 +76,11 @@ const char *Fl_Printer::property_save = "Save";
/** [this text may be customized at run-time] */
const char *Fl_Printer::property_cancel = "Cancel";
-const char *Fl_Printer::device_type = "Fl_Printer";
+const char *Fl_Printer::class_id = "Fl_Printer";
#if defined(__APPLE__) || defined(WIN32)
-const char *Fl_System_Printer::device_type = "Fl_Printer";
+const char *Fl_System_Printer::class_id = "Fl_Printer";
#elif !defined(FL_DOXYGEN)
-const char *Fl_PostScript_Printer::device_type = "Fl_Printer";
+const char *Fl_PostScript_Printer::class_id = "Fl_Printer";
#endif
#if defined(__APPLE__) || defined(WIN32)
diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm
index 31de4137a..23bef5c55 100644
--- a/src/Fl_Quartz_Printer.mm
+++ b/src/Fl_Quartz_Printer.mm
@@ -40,7 +40,7 @@ Fl_System_Printer::Fl_System_Printer(void)
x_offset = 0;
y_offset = 0;
scale_x = scale_y = 1.;
- type_ = device_type;
+ class_name(class_id);
gc = 0;
driver(fl_graphics_driver);
}
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 7df208a97..40d0c104f 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3256,7 +3256,7 @@ WindowRef Fl_X::window_ref()
// so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes
CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
- if ( Fl_Surface_Device::surface()->type() == Fl_Printer::device_type ) return CGRectMake(x, y, w-1.5 , h-1.5 );
+ if ( Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id ) return CGRectMake(x, y, w-1.5 , h-1.5 );
return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0);
}
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index e8a09d2d0..bba615ad0 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1911,7 +1911,7 @@ void fl_cleanup_dc_list(void) { // clean up the list
}
Fl_Region XRectangleRegion(int x, int y, int w, int h) {
- if (Fl_Surface_Device::surface()->type() == Fl_Display_Device::device_type) return CreateRectRgn(x,y,x+w,y+h);
+ if (Fl_Surface_Device::surface()->class_name() == Fl_Display_Device::class_id) return CreateRectRgn(x,y,x+w,y+h);
// because rotation may apply, the rectangle becomes a polygon in device coords
POINT pt[4] = { {x, y}, {x + w, y}, {x + w, y + h}, {x, y + h} };
LPtoDP(fl_gc, pt, 4);
diff --git a/src/fl_draw_image_win32.cxx b/src/fl_draw_image_win32.cxx
index 77f36038e..c9b3fd46a 100644
--- a/src/fl_draw_image_win32.cxx
+++ b/src/fl_draw_image_win32.cxx
@@ -255,7 +255,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
}
}
}
- if(Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) {
+ if(Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) {
// if print context, device and logical units are not equal, so SetDIBitsToDevice
// does not do the expected job, whereas StretchDIBits does it.
StretchDIBits(fl_gc, x, y+j-k, w, k, 0, 0, w, k,
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index c1e64cf1e..25b485952 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_graphics_driver->type() == Fl_Quartz_Graphics_Driver::device_type ) {
+ if (fl_graphics_driver->class_name() == Fl_Quartz_Graphics_Driver::class_id ) {
bool transparent = (transparent_index>=0);
transparent = true;
U32 *array = new U32[d.w * d.h], *q = array;
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index 31760c463..63d51686a 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -250,7 +250,7 @@ static void on_printer_extents_update(int &dx, int &dy, int &w, int &h)
// if printer context, extents shd be converted to logical coords
#define EXTENTS_UPDATE(x,y,w,h) \
- if (Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) { on_printer_extents_update(x,y,w,h); }
+ if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { on_printer_extents_update(x,y,w,h); }
static unsigned short *ext_buff = NULL; // UTF-16 converted version of input UTF-8 string
static unsigned wc_len = 0; // current string buffer dimension
diff --git a/src/fl_line_style.cxx b/src/fl_line_style.cxx
index 87f00678c..a22b1c30a 100644
--- a/src/fl_line_style.cxx
+++ b/src/fl_line_style.cxx
@@ -127,7 +127,7 @@ void Fl_Graphics_Driver::line_style(int style, int width, char* dashes) {
fl_quartz_line_width_ = (float)width;
fl_quartz_line_cap_ = Cap[(style>>8)&3];
// when printing kCGLineCapSquare seems better for solid lines
- if ( Fl_Surface_Device::surface()->type() == Fl_Printer::device_type && style == FL_SOLID && dashes == NULL ) {
+ if ( Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id && style == FL_SOLID && dashes == NULL ) {
fl_quartz_line_cap_ = kCGLineCapSquare;
}
fl_quartz_line_join_ = Join[(style>>12)&3];
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index b050c01cf..ea9c10949 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -49,7 +49,7 @@ extern int fl_line_width_;
#ifdef __APPLE_QUARTZ__
extern float fl_quartz_line_width_;
-#define USINGQUARTZPRINTER (Fl_Surface_Device::surface()->type() == Fl_Printer::device_type)
+#define USINGQUARTZPRINTER (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id)
#endif
#ifdef USE_X11
@@ -627,7 +627,7 @@ int Fl_Graphics_Driver::not_clipped(int x, int y, int w, int h) {
return XRectInRegion(r, x, y, w, h);
#elif defined(WIN32)
RECT rect;
- if (Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) { // in case of print context, convert coords from logical to device
+ if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { // in case of print context, convert coords from logical to device
POINT pt[2] = { {x, y}, {x + w, y + h} };
LPtoDP(fl_gc, pt, 2);
rect.left = pt[0].x; rect.top = pt[0].y; rect.right = pt[1].x; rect.bottom = pt[1].y;
@@ -687,7 +687,7 @@ int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y, int
} else { // partial intersection
RECT rect;
GetRgnBox(temp, &rect);
- if(Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) { // if print context, convert coords from device to logical
+ if(Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { // if print context, convert coords from device to logical
POINT pt[2] = { {rect.left, rect.top}, {rect.right, rect.bottom} };
DPtoLP(fl_gc, pt, 2);
X = pt[0].x; Y = pt[0].y; W = pt[1].x - X; H = pt[1].y - Y;