mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 21:25:30 +08:00
virtualized Fl_Graphics_Driver::global_gc(), a function that should probably not exeist.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -249,7 +249,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
|
// --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
|
||||||
void global_gc(void);
|
virtual void global_gc();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FL_GRAPHICS_DRIVER_H
|
#endif // FL_GRAPHICS_DRIVER_H
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ void Fl_Graphics_Driver::reset_spot()
|
|||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Fl_Graphics_Driver::global_gc()
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id$".
|
// End of "$Id$".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -318,10 +318,6 @@ void fl_end_offscreen()
|
|||||||
# pragma message "FL_PORTING: implement fl_end_offscreen"
|
# pragma message "FL_PORTING: implement fl_end_offscreen"
|
||||||
}
|
}
|
||||||
|
|
||||||
void fl_clipboard_notify_change() {
|
|
||||||
# pragma message "FL_PORTING: implement fl_clipboard_notify_change"
|
|
||||||
}
|
|
||||||
|
|
||||||
Fl_Font_Descriptor::~Fl_Font_Descriptor()
|
Fl_Font_Descriptor::~Fl_Font_Descriptor()
|
||||||
{
|
{
|
||||||
# pragma message "FL_PORTING: implement Fl_Font_Descriptor::~Fl_Font_Descriptor"
|
# pragma message "FL_PORTING: implement Fl_Font_Descriptor::~Fl_Font_Descriptor"
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ protected:
|
|||||||
void color(uchar r, uchar g, uchar b);
|
void color(uchar r, uchar g, uchar b);
|
||||||
void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
|
void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
|
||||||
void reset_spot();
|
void reset_spot();
|
||||||
|
protected:
|
||||||
|
void global_gc();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,17 +23,6 @@
|
|||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
|
|
||||||
|
|
||||||
/* Reference to the current device context
|
|
||||||
For back-compatibility only. The preferred procedure to get this reference is
|
|
||||||
Fl_Surface_Device::surface()->driver()->gc().
|
|
||||||
*/
|
|
||||||
HDC fl_gc = 0;
|
|
||||||
|
|
||||||
void Fl_Graphics_Driver::global_gc()
|
|
||||||
{
|
|
||||||
fl_gc = (HDC)gc();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By linking this module, the following static method will instantiate the
|
* By linking this module, the following static method will instantiate the
|
||||||
* MSWindows GDI Graphics driver as the main display driver.
|
* MSWindows GDI Graphics driver as the main display driver.
|
||||||
@@ -52,6 +41,17 @@ typedef BOOL (WINAPI* fl_alpha_blend_func)
|
|||||||
static fl_alpha_blend_func fl_alpha_blend = NULL;
|
static fl_alpha_blend_func fl_alpha_blend = NULL;
|
||||||
static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
|
static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
|
||||||
|
|
||||||
|
/* Reference to the current device context
|
||||||
|
For back-compatibility only. The preferred procedure to get this reference is
|
||||||
|
Fl_Surface_Device::surface()->driver()->gc().
|
||||||
|
*/
|
||||||
|
HDC fl_gc = 0;
|
||||||
|
|
||||||
|
void Fl_GDI_Graphics_Driver::global_gc()
|
||||||
|
{
|
||||||
|
fl_gc = (HDC)gc();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function checks if the version of MSWindows that we
|
* This function checks if the version of MSWindows that we
|
||||||
* curently run on supports alpha blending for bitmap transfers
|
* curently run on supports alpha blending for bitmap transfers
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ class Fl_Pico_Graphics_Driver : public Fl_Graphics_Driver {
|
|||||||
// // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
|
// // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
|
||||||
// virtual void transformed_vertex0(COORD_T x, COORD_T y);
|
// virtual void transformed_vertex0(COORD_T x, COORD_T y);
|
||||||
// virtual void fixloop();
|
// virtual void fixloop();
|
||||||
// void global_gc(void);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FL_PICO_GRAPHICS_DRIVER_H
|
#endif // FL_PICO_GRAPHICS_DRIVER_H
|
||||||
|
|||||||
@@ -463,7 +463,6 @@ Fl_Fontdesc* fl_fonts = NULL;
|
|||||||
void fl_set_spot(int, int, int, int, int, int, Fl_Window*) { }
|
void fl_set_spot(int, int, int, int, int, int, Fl_Window*) { }
|
||||||
void fl_reset_spot() { }
|
void fl_reset_spot() { }
|
||||||
const char *fl_filename_name(char const*) { return 0; }
|
const char *fl_filename_name(char const*) { return 0; }
|
||||||
void fl_clipboard_notify_change() { }
|
|
||||||
|
|
||||||
//Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() { return 0; }
|
//Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() { return 0; }
|
||||||
//Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() { return 0; }
|
//Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() { return 0; }
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ protected:
|
|||||||
// CGContextRef gc_;
|
// CGContextRef gc_;
|
||||||
public:
|
public:
|
||||||
// virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
|
// virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
|
||||||
// virtual void gc(void *ctxt) {if (ctxt != gc_) global_gc(); gc_ = (CGContextRef)ctxt; }
|
|
||||||
// virtual void *gc() {return gc_;}
|
// virtual void *gc() {return gc_;}
|
||||||
// char can_do_alpha_blending();
|
// char can_do_alpha_blending();
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -142,41 +142,10 @@ double Fl_PicoSDL_Screen_Driver::wait(double time_to_wait)
|
|||||||
#include <FL/Fl_Double_Window.H>
|
#include <FL/Fl_Double_Window.H>
|
||||||
#include <FL/Fl_Graphics_Driver.H>
|
#include <FL/Fl_Graphics_Driver.H>
|
||||||
|
|
||||||
/*
|
|
||||||
* The following code should not be here!
|
|
||||||
* All this must be refactored into the driver system!
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
The following symbols are not found if we naively compile the core modules and
|
|
||||||
no specific platform implementations. This list is a hint at all the functions
|
|
||||||
and methods that probably need to be refactored into the driver system.
|
|
||||||
|
|
||||||
Undefined symbols for architecture x86_64:
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(FL_DOXYGEN) // FIXME silence Doxygen warnings
|
|
||||||
|
|
||||||
//const char *fl_filename_name(char const*) { return 0; }
|
|
||||||
void fl_clipboard_notify_change() { }
|
|
||||||
|
|
||||||
//Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() { return 0; }
|
|
||||||
//Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() { return 0; }
|
|
||||||
void Fl_Graphics_Driver::global_gc() { }
|
|
||||||
//int Fl::dnd() { return 0; }
|
|
||||||
//void Fl::copy(char const*, int, int, char const*) { }
|
|
||||||
//void Fl::paste(Fl_Widget&, int, char const*) { }
|
|
||||||
//void Fl::get_mouse(int&, int&) { }
|
|
||||||
void Fl::set_color(Fl_Color, unsigned int) { }
|
void Fl::set_color(Fl_Color, unsigned int) { }
|
||||||
int Fl_X::set_cursor(Fl_Cursor) { return 0; }
|
int Fl_X::set_cursor(Fl_Cursor) { return 0; }
|
||||||
int Fl_X::set_cursor(Fl_RGB_Image const*, int, int) { return 0; }
|
int Fl_X::set_cursor(Fl_RGB_Image const*, int, int) { return 0; }
|
||||||
|
|
||||||
//void Fl_Window::size_range_() { }
|
|
||||||
//void Fl_Window::fullscreen_x() { }
|
|
||||||
|
|
||||||
//void Fl_Window::fullscreen_off_x(int, int, int, int) { }
|
|
||||||
|
|
||||||
Window fl_xid(const Fl_Window* w)
|
Window fl_xid(const Fl_Window* w)
|
||||||
{
|
{
|
||||||
Fl_X *temp = Fl_X::i(w);
|
Fl_X *temp = Fl_X::i(w);
|
||||||
@@ -188,15 +157,9 @@ Fl_X* Fl_X::make(Fl_Window *w)
|
|||||||
return w->driver()->makeWindow();
|
return w->driver()->makeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void Fl_Window::label(char const*, char const*) { }
|
|
||||||
//void Fl_Window::resize(int, int, int, int) { }
|
|
||||||
//Fl_Window *Fl_Window::current_;
|
|
||||||
char fl_show_iconic;
|
char fl_show_iconic;
|
||||||
Window fl_window;
|
Window fl_window;
|
||||||
//void Fl_Image_Surface::translate(int x, int y) { }
|
|
||||||
//void Fl_Image_Surface::untranslate() { }
|
|
||||||
|
|
||||||
//void Fl::add_fd(int, void (*)(int, void*), void*)
|
|
||||||
void Fl::add_fd(int, Fl_FD_Handler, void*)
|
void Fl::add_fd(int, Fl_FD_Handler, void*)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -210,9 +173,6 @@ void Fl_X::flush()
|
|||||||
w->flush();
|
w->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(FL_DOXYGEN) // FIXME silence Doxygen warnings
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_PicoSDL_Screen_Driver.cxx 11253 2016-03-01 00:54:21Z matt $".
|
// End of "$Id: Fl_PicoSDL_Screen_Driver.cxx 11253 2016-03-01 00:54:21Z matt $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ protected:
|
|||||||
void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
|
void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
|
||||||
int height();
|
int height();
|
||||||
int descent();
|
int descent();
|
||||||
|
protected:
|
||||||
|
virtual void global_gc();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern float fl_quartz_line_width_;
|
extern float fl_quartz_line_width_;
|
||||||
|
|||||||
@@ -21,17 +21,6 @@
|
|||||||
#include "Fl_Quartz_Graphics_Driver.H"
|
#include "Fl_Quartz_Graphics_Driver.H"
|
||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
|
|
||||||
/* Reference to the current CGContext
|
|
||||||
For back-compatibility only. The preferred procedure to get this reference is
|
|
||||||
Fl_Surface_Device::surface()->driver()->gc().
|
|
||||||
*/
|
|
||||||
CGContextRef fl_gc = 0;
|
|
||||||
|
|
||||||
void Fl_Graphics_Driver::global_gc()
|
|
||||||
{
|
|
||||||
fl_gc = (CGContextRef)gc();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By linking this module, the following static method will instantiate the
|
* By linking this module, the following static method will instantiate the
|
||||||
* OS X Quartz Graphics driver as the main display driver.
|
* OS X Quartz Graphics driver as the main display driver.
|
||||||
@@ -51,6 +40,17 @@ static void bmProviderRelease (void *src, const void *data, size_t size) {
|
|||||||
if(count == 1) free((void*)data);
|
if(count == 1) free((void*)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reference to the current CGContext
|
||||||
|
For back-compatibility only. The preferred procedure to get this reference is
|
||||||
|
Fl_Surface_Device::surface()->driver()->gc().
|
||||||
|
*/
|
||||||
|
CGContextRef fl_gc = 0;
|
||||||
|
|
||||||
|
void Fl_Quartz_Graphics_Driver::global_gc()
|
||||||
|
{
|
||||||
|
fl_gc = (CGContextRef)gc();
|
||||||
|
}
|
||||||
|
|
||||||
void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscreen osrc,int srcx,int srcy) {
|
void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscreen osrc,int srcx,int srcy) {
|
||||||
CGContextRef src = (CGContextRef)osrc;
|
CGContextRef src = (CGContextRef)osrc;
|
||||||
void *data = CGBitmapContextGetData(src);
|
void *data = CGBitmapContextGetData(src);
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ protected:
|
|||||||
virtual float scale_bitmap_for_PostScript();
|
virtual float scale_bitmap_for_PostScript();
|
||||||
virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
|
virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
|
||||||
virtual void reset_spot();
|
virtual void reset_spot();
|
||||||
|
protected:
|
||||||
|
virtual void global_gc();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,16 +28,6 @@
|
|||||||
#include <X11/extensions/Xrender.h>
|
#include <X11/extensions/Xrender.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Reference to the current graphics context
|
|
||||||
For back-compatibility only. The preferred procedure to get this pointer is
|
|
||||||
Fl_Surface_Device::surface()->driver()->gc().
|
|
||||||
*/
|
|
||||||
GC fl_gc = 0;
|
|
||||||
|
|
||||||
void Fl_Graphics_Driver::global_gc()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By linking this module, the following static method will instantiate the
|
* By linking this module, the following static method will instantiate the
|
||||||
@@ -50,6 +40,16 @@ Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
|
|||||||
|
|
||||||
GC Fl_Xlib_Graphics_Driver::gc_ = NULL;
|
GC Fl_Xlib_Graphics_Driver::gc_ = NULL;
|
||||||
|
|
||||||
|
/* Reference to the current graphics context
|
||||||
|
For back-compatibility only. The preferred procedure to get this pointer is
|
||||||
|
Fl_Surface_Device::surface()->driver()->gc().
|
||||||
|
*/
|
||||||
|
GC fl_gc = 0;
|
||||||
|
|
||||||
|
void Fl_Xlib_Graphics_Driver::global_gc()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) {
|
Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) {
|
||||||
mask_bitmap_ = NULL;
|
mask_bitmap_ = NULL;
|
||||||
p_size = 0;
|
p_size = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user