diff options
| author | Manolo Gouy <Manolo> | 2016-02-26 16:12:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-26 16:12:43 +0000 |
| commit | 6287426b65e297bb27ab31aa9fba53b92a048451 (patch) | |
| tree | 6c6fd8fdde76bbbccad955ca09b294f653b2da91 /src | |
| parent | df18e581af1f96e37668df753305e55511d3e941 (diff) | |
Rename all remaining src/drivers/XXX.h to XXX.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11226 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
37 files changed, 318 insertions, 258 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c1e5e7a3f..45f20b373 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -191,10 +191,10 @@ if (USE_X11) ) endif (USE_XFT) set(DRIVER_HEADER_FILES - drivers/Posix/Fl_Posix_System_Driver.h - drivers/X11/Fl_X11_Screen_Driver.h - drivers/X11/Fl_X11_Window_Driver.h - drivers/Quartz/Fl_Quartz_Graphics_Driver.h + drivers/Posix/Fl_Posix_System_Driver.H + drivers/X11/Fl_X11_Screen_Driver.H + drivers/X11/Fl_X11_Window_Driver.H + drivers/Quartz/Fl_Quartz_Graphics_Driver.H ) elseif (APPLE) @@ -217,10 +217,10 @@ elseif (APPLE) drivers/Darwin/Fl_Darwin_System_Driver.cxx ) set(DRIVER_HEADER_FILES - drivers/Darwin/Fl_Darwin_System_Driver.h - drivers/Cocoa/Fl_Cocoa_Screen_Driver.h - drivers/Cocoa/Fl_Cocoa_Window_Driver.h - drivers/Quartz/Fl_Quartz_Graphics_Driver.h + drivers/Darwin/Fl_Darwin_System_Driver.H + drivers/Cocoa/Fl_Cocoa_Screen_Driver.H + drivers/Cocoa/Fl_Cocoa_Window_Driver.H + drivers/Quartz/Fl_Quartz_Graphics_Driver.H ) else () @@ -241,10 +241,10 @@ else () drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx ) set(DRIVER_HEADER_FILES - drivers/WinAPI/Fl_WinAPI_System_Driver.h - drivers/WinAPI/Fl_WinAPI_Screen_Driver.h - drivers/WinAPI/Fl_WinAPI_Window_Driver.h - drivers/GDI/Fl_GDI_Graphics_Driver.h + drivers/WinAPI/Fl_WinAPI_System_Driver.H + drivers/WinAPI/Fl_WinAPI_Screen_Driver.H + drivers/WinAPI/Fl_WinAPI_Window_Driver.H + drivers/GDI/Fl_GDI_Graphics_Driver.H ) endif (USE_X11) @@ -294,8 +294,8 @@ set (GL_DRIVER_FILES drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx ) set (GL_DRIVER_HEADER_FILES - drivers/OpenGL/Fl_OpenGL_Display_Device.h - drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h + drivers/OpenGL/Fl_OpenGL_Display_Device.H + drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H ) source_group("Driver Header Files" FILES ${GL_DRIVER_HEADER_FILES}) diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index f05c6edc8..1484504b6 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -26,7 +26,7 @@ #include "drivers/Xlib/Fl_Translated_Xlib_Graphics_Driver.H" #endif #ifdef FL_CFG_GFX_GDI -#include "drivers/GDI/Fl_GDI_Graphics_Driver.h" +#include "drivers/GDI/Fl_GDI_Graphics_Driver.H" #endif diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx index 195579436..a89bda453 100644 --- a/src/Fl_GDI_Printer.cxx +++ b/src/Fl_GDI_Printer.cxx @@ -18,7 +18,7 @@ #ifdef WIN32 -#include "drivers/GDI/Fl_GDI_Graphics_Driver.h" +#include "drivers/GDI/Fl_GDI_Graphics_Driver.H" #include <FL/Fl_Printer.H> diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 7cf1e294e..590a61ee3 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -35,7 +35,7 @@ extern int fl_gl_load_plugin; #include <stdlib.h> #include <FL/fl_utf8.h> -#include "drivers/OpenGL/Fl_OpenGL_Display_Device.h" +#include "drivers/OpenGL/Fl_OpenGL_Display_Device.H" #if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management #elif defined(FL_PORTING) diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 5aee95991..e8642c2bf 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -22,10 +22,10 @@ #include "config_lib.h" #ifdef FL_CFG_GFX_QUARTZ -#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.h" +#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.H" #endif #ifdef FL_CFG_GFX_GDI -#include "drivers/GDI/Fl_GDI_Graphics_Driver.h" +#include "drivers/GDI/Fl_GDI_Graphics_Driver.H" #endif #ifdef FL_CFG_GFX_XLIB #include "drivers/Xlib/Fl_Translated_Xlib_Graphics_Driver.H" diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index ddcb569e7..6f048aee5 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -48,7 +48,7 @@ class Fl_Widget *fl_selection_requestor; # include <stdio.h> # include <stdlib.h> # include "flstring.h" -# include "drivers/X11/Fl_X11_Screen_Driver.h" +# include "drivers/X11/Fl_X11_Screen_Driver.H" # include <unistd.h> # include <time.h> # include <sys/time.h> diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H new file mode 100644 index 000000000..370a06316 --- /dev/null +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -0,0 +1,50 @@ +// +// "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $" +// +// Definition of Apple Darwin system driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 2010-2016 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +/** + \file Fl_Darwin_System_Driver.H + \brief Definition of Apple Darwin system driver. + */ + +#ifndef FL_DARWIN_SYSTEM_DRIVER_H +#define FL_DARWIN_SYSTEM_DRIVER_H + +#include <FL/Fl_System_Driver.H> + +/* + Move everything here that manages the system interface. + + There is excatly one system driver. + + - filename and pathname management + - directory and file access + - system time and system timer + - multithreading + */ + +class Fl_Darwin_System_Driver : public Fl_System_Driver +{ +public: +}; + +#endif // FL_DARWIN_SYSTEM_DRIVER_H + +// +// End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $". +// diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx index 80baf3f6b..1b08b30e4 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_Darwin_System_Driver.h" +#include "Fl_Darwin_System_Driver.H" // diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 1230290c6..248c9a933 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -19,7 +19,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include <FL/Fl.H> diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h deleted file mode 100644 index a4b2730aa..000000000 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h +++ /dev/null @@ -1,153 +0,0 @@ -// -// "$Id$" -// -// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device -// for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2016 by Bill Spitzak and others. -// -// This library is free software. Distribution and use rights are outlined in -// the file "COPYING" which should have been included with this file. If this -// file is missing or damaged, see the license at: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** - \file gdi.h - \brief Definition of MSWindows GDI graphics driver. - */ - -#ifndef FL_GDI_GRAPHICS_DRIVER_H -#define FL_GDI_GRAPHICS_DRIVER_H - -#include <FL/Fl_Graphics_Driver.H> -#include <windows.h> - - -/** - \brief The MSWindows-specific graphics class. - * - This class is implemented only on the MSWindows platform. - */ -class FL_EXPORT Fl_GDI_Graphics_Driver : public Fl_Graphics_Driver { -protected: - HDC gc_; - int numcount; - int counts[20]; - uchar **mask_bitmap_; - uchar **mask_bitmap() {return mask_bitmap_;} - void mask_bitmap(uchar **value) { mask_bitmap_ = value; } -public: - Fl_GDI_Graphics_Driver() {mask_bitmap_ = NULL;} - virtual int has_feature(driver_feature mask) { return mask & NATIVE; } - char can_do_alpha_blending(); - virtual void gc(void *ctxt) {if (ctxt != gc_) global_gc(); gc_ = (HDC)ctxt;} - virtual void *gc() {return gc_;} - - // --- bitmap stuff - Fl_Bitmask create_bitmask(int w, int h, const uchar *array); - void delete_bitmask(Fl_Bitmask bm); - void draw(const char* str, int n, int x, int y); - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* str, int n, int x, int y); - void font(Fl_Font face, Fl_Fontsize size); - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - fl_uintptr_t cache(Fl_Pixmap *img, int w, int h, const char *const*array); - fl_uintptr_t cache(Fl_Bitmap *img, int w, int h, const uchar *array); - void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); - double width(const char *str, int n); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height(); - int descent(); -#if ! defined(FL_DOXYGEN) - void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy); -#endif - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -protected: - // --- implementation is in src/fl_rect.cxx which includes src/cfg_gfx/gdi_rect.cxx - void point(int x, int y); - void rect(int x, int y, int w, int h); - void focus_rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); - void line(int x, int y, int x1, int y1); - void line(int x, int y, int x1, int y1, int x2, int y2); - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - // --- clipping - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); - void restore_clip(); - // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx - void begin_complex_polygon(); - void transformed_vertex(double xf, double yf); - void vertex(double x, double y); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void end_complex_polygon(); - void gap(); - void circle(double x, double y, double r); - // --- implementation is in src/fl_arc.cxx which includes src/cfg_gfx/xxx_arc.cxx if needed - // using void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double end); - // --- implementation is in src/fl_arci.cxx which includes src/cfg_gfx/xxx_arci.cxx - void arc(int x, int y, int w, int h, double a1, double a2); - void pie(int x, int y, int w, int h, double a1, double a2); - // --- implementation is in src/fl_line_style.cxx which includes src/cfg_gfx/xxx_line_style.cxx - void line_style(int style, int width=0, char* dashes=0); - // --- implementation is in src/fl_color.cxx which includes src/cfg_gfx/xxx_color.cxx - void color(Fl_Color c); - Fl_Color color() { return color_; } - void color(uchar r, uchar g, uchar b); -}; - -/** - The graphics driver used when printing on MSWindows. - * - This class is implemented only on the MSWindows platform. It 's extremely similar to Fl_GDI_Graphics_Driver. - */ -class FL_EXPORT Fl_GDI_Printer_Graphics_Driver : public Fl_GDI_Graphics_Driver { -public: - virtual int has_feature(driver_feature mask) { return mask & (NATIVE | PRINTER); } - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy); - int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP); -}; - -class Fl_Translated_GDI_Graphics_Driver : public Fl_GDI_Graphics_Driver { - unsigned depth; - POINT origins[10]; -public: - Fl_Translated_GDI_Graphics_Driver() {depth = 0;} - virtual void translate_all(int x, int y); - virtual void untranslate_all(void); -}; - -#endif // FL_GDI_GRAPHICS_DRIVER_H - -// -// End of "$Id$". -// diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx index 7d70ddd42..89597fbc4 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx @@ -30,7 +30,7 @@ // hand-drawn bitmaps of small circles!) and may be implemented by // hardware and thus are fast. -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include <FL/math.h> diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_color.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_color.cxx index 046fe6df0..c32bbd8cb 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_color.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_color.cxx @@ -21,7 +21,7 @@ // changes can be made. Not to be confused with the X colormap, which // I try to hide completely. -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include <config.h> #include <FL/Fl.H> diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx index 907f6f50f..58049c562 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx @@ -36,7 +36,7 @@ #endif // Select fonts from the FLTK font table. -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include "../../flstring.h" #include <FL/Fl.H> #include <FL/fl_draw.H> diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index dca25ef8d..4a1c6e007 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -36,7 +36,7 @@ //////////////////////////////////////////////////////////////// #include <config.h> -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include <FL/Fl.H> #include <FL/Fl_Printer.H> #include <FL/fl_draw.H> diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx index d3d07241d..9518dc6e6 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx @@ -32,7 +32,7 @@ \brief Line style drawing utility hiding different platforms. */ -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" extern int fl_line_width_; // defined in src/fl_line_style.cxx diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx index c6ce9d044..0806ceba3 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx @@ -30,7 +30,7 @@ #include <FL/fl_draw.H> #include <FL/x.H> -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" // --- line and polygon drawing with integer coordinates diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx index cb871a6ac..a5556bbd9 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx @@ -25,7 +25,7 @@ simple 2D transformations, implemented for MSWindows GDI. */ -#include "Fl_GDI_Graphics_Driver.h" +#include "Fl_GDI_Graphics_Driver.H" #include <FL/fl_draw.H> #include <FL/x.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx index bd2ab3b58..707bd1e52 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx @@ -22,8 +22,8 @@ #include <FL/Fl_Device.H> #include <FL/gl.h> -#include "Fl_OpenGL_Graphics_Driver.h" -#include "Fl_OpenGL_Display_Device.h" +#include "Fl_OpenGL_Graphics_Driver.H" +#include "Fl_OpenGL_Display_Device.H" // TODO: much of Fl_Gl_Choice should probably go here diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h deleted file mode 100644 index 9730fc9c4..000000000 --- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// "$Id$" -// -// implementation of class Fl_Gl_Device_Plugin for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2014 by Bill Spitzak and others. -// -// This library is free software. Distribution and use rights are outlined in -// the file "COPYING" which should have been included with this file. If this -// file is missing or damaged, see the license at: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems to: -// -// http://www.fltk.org/str.php -// - - -#include <FL/Fl_Device.H> - -class Fl_OpenGL_Graphics_Driver; - -/** - OpenGL Surface. - This surface is needed as an interface between GL windows and the GL graphics driver. - */ -class FL_EXPORT Fl_OpenGL_Display_Device : public Fl_Surface_Device { -public: - Fl_OpenGL_Display_Device(Fl_OpenGL_Graphics_Driver *graphics_driver); - static Fl_OpenGL_Display_Device *display_device(); -}; - - -// -// End of "$Id$". -// diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H new file mode 100644 index 000000000..b12e661f9 --- /dev/null +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H @@ -0,0 +1,102 @@ +// +// "$Id$" +// +// Definition of OpenGL graphics driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2016 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +/** + \file opengl.H + \brief Definition of OpenGL graphics driver. + */ + +#ifndef FL_CFG_GFX_OPENGL_H +#define FL_CFG_GFX_OPENGL_H + +#include <FL/Fl_Graphics_Driver.H> + + +/** + \brief OpenGL specific graphics class. + */ +class FL_EXPORT Fl_OpenGL_Graphics_Driver : public Fl_Graphics_Driver { +public: + // --- line and polygon drawing with integer coordinates + void point(int x, int y); + void rect(int x, int y, int w, int h); + void rectf(int x, int y, int w, int h); + void line(int x, int y, int x1, int y1); + void line(int x, int y, int x1, int y1, int x2, int y2); + void xyline(int x, int y, int x1); + void xyline(int x, int y, int x1, int y2); + void xyline(int x, int y, int x1, int y2, int x3); + void yxline(int x, int y, int y1); + void yxline(int x, int y, int y1, int x2); + void yxline(int x, int y, int y1, int x2, int y3); + void loop(int x0, int y0, int x1, int y1, int x2, int y2); + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void polygon(int x0, int y0, int x1, int y1, int x2, int y2); + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void push_clip(int x, int y, int w, int h); + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); + int not_clipped(int x, int y, int w, int h); + void push_no_clip(); + void pop_clip(); + void restore_clip(); + // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx + void transformed_vertex0(COORD_T x, COORD_T y); + void transformed_vertex(double xf, double yf); + void vertex(double x, double y); + void begin_points(); + void end_points(); + void begin_line(); + void end_line(); + void begin_loop(); + void end_loop(); + void begin_polygon(); + void end_polygon(); + void begin_complex_polygon(); + void gap(); + void end_complex_polygon(); + void fixloop(); + void circle(double x, double y, double r); + // --- implementation is in src/fl_arc.cxx which includes src/cfg_gfx/xxx_arc.cxx if needed + // using void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double end); + // --- implementation is in src/fl_arci.cxx which includes src/cfg_gfx/xxx_arci.cxx + void arc(int x, int y, int w, int h, double a1, double a2); + void pie(int x, int y, int w, int h, double a1, double a2); + // --- implementation is in src/fl_line_style.cxx which includes src/cfg_gfx/xxx_line_style.cxx + void line_style(int style, int width=0, char* dashes=0); + // --- implementation is in src/fl_color.cxx which includes src/cfg_gfx/xxx_color.cxx + void color(Fl_Color c); + Fl_Color color() { return color_; } + void color(uchar r, uchar g, uchar b); + // --- implementation is in src/fl_font.cxx which includes src/cfg_gfx/xxx_font.cxx + void draw(const char *str, int n, int x, int y); + double width(const char *str, int n); + void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); + int height(); + int descent(); + // --- + Fl_Bitmask create_bitmask(int w, int h, const uchar *array) { return 0L; } + void delete_bitmask(Fl_Bitmask bm) { }; +}; + + +#endif // FL_CFG_GFX_OPENGL_H + +// +// End of "$Id$". +// diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx index af0d3935c..227b50de3 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx @@ -20,7 +20,7 @@ #define FL_CFG_GFX_OPENGL_CXX #include <FL/gl.h> -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #endif // FL_CFG_GFX_OPENGL_RECT_CXX diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx index e77c7d5ff..649f18398 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx @@ -26,7 +26,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/gl.h> #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx index a08507c93..b80290490 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx @@ -23,7 +23,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/gl.h> #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx index 7209cbd7b..13f9d5ac6 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx @@ -29,7 +29,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/gl.h> #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx index daebb2e21..b3eea4eb6 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx @@ -26,7 +26,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/gl.h> #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx index 8536d4901..7a1a28da7 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx @@ -27,7 +27,7 @@ #include <config.h> #include "../../config_lib.h" -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/gl.h> #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx index 1dd091f0d..76fd3cf4a 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx @@ -25,7 +25,7 @@ simple 2D transformations, implemented for OpenGL. */ -#include "Fl_OpenGL_Graphics_Driver.h" +#include "Fl_OpenGL_Graphics_Driver.H" #include <FL/fl_draw.H> #include <FL/gl.h> diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H new file mode 100644 index 000000000..bf4fb6c92 --- /dev/null +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -0,0 +1,50 @@ +// +// "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $" +// +// Definition of Posix system driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 2010-2016 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +/** + \file Fl_Posix_System_Driver.H + \brief Definition of Posix system driver. + */ + +#ifndef FL_POSIX_SYSTEM_DRIVER_H +#define FL_POSIX_SYSTEM_DRIVER_H + +#include <FL/Fl_System_Driver.H> + +/* + Move everything here that manages the system interface. + + There is excatly one system driver. + + - filename and pathname management + - directory and file access + - system time and system timer + - multithreading + */ + +class Fl_Posix_System_Driver : public Fl_System_Driver +{ +public: +}; + +#endif // FL_POSIX_SYSTEM_DRIVER_H + +// +// End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $". +// diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index 0a11e03aa..866be9b3d 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_Posix_System_Driver.h" +#include "Fl_Posix_System_Driver.H" // diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.h b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H index dc62e246a..88edd3b43 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.h +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H @@ -1,7 +1,7 @@ // // "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $" // -// Definition of X11 Screen interface +// Definition of MSWindows Win32/64 Screen interface // for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2016 by Bill Spitzak and others. @@ -18,37 +18,34 @@ // /** - \file Fl_X11_Screen_Driver.h - \brief Definition of X11 Screen interface + \file Fl_WinAPI_Screen_Driver.H + \brief Definition of MSWindows Win32/64 Screen interface. */ -#ifndef FL_X11_SCREEN_DRIVER_H -#define FL_X11_SCREEN_DRIVER_H +#ifndef FL_WINAPI_SCREEN_DRIVER_H +#define FL_WINAPI_SCREEN_DRIVER_H #include <FL/Fl_Screen_Driver.H> +#include <FL/x.H> class Fl_Window; -class FL_EXPORT Fl_X11_Screen_Driver : public Fl_Screen_Driver +class FL_EXPORT Fl_WinAPI_Screen_Driver : public Fl_Screen_Driver { protected: - typedef struct { - short x_org; - short y_org; - short width; - short height; - } FLScreenInfo; - FLScreenInfo screens[MAX_SCREENS]; + RECT screens[MAX_SCREENS]; + RECT work_area[MAX_SCREENS]; float dpi[MAX_SCREENS][2]; + static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM); + BOOL screen_cb(HMONITOR mon, HDC, LPRECT r); + public: // --- display management - virtual void display(const char *disp); virtual int visual(int flags); // --- screen configuration - void init_workarea(); virtual void init(); virtual int x(); virtual int y(); @@ -71,7 +68,7 @@ public: }; -#endif // FL_X11_SCREEN_DRIVER_H +#endif // FL_WINAPI_SCREEN_DRIVER_H // // End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $". diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index bc642fdde..2ebb2fb4f 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_WinAPI_Screen_Driver.h" +#include "Fl_WinAPI_Screen_Driver.H" #include <FL/Fl.H> #include <FL/x.H> #include <FL/Fl_Graphics_Driver.H> diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H new file mode 100644 index 000000000..accc6d29b --- /dev/null +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -0,0 +1,50 @@ +// +// "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $" +// +// Definition of MSWindows system driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 2010-2016 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +/** + \file Fl_WinAPI_System_Driver.H + \brief Definition of MSWindows system driver. + */ + +#ifndef FL_WINAPI_SYSTEM_DRIVER_H +#define FL_WINAPI_SYSTEM_DRIVER_H + +#include <FL/Fl_System_Driver.H> + +/* + Move everything here that manages the system interface. + + There is excatly one system driver. + + - filename and pathname management + - directory and file access + - system time and system timer + - multithreading + */ + +class Fl_WinAPI_System_Driver : public Fl_System_Driver +{ +public: +}; + +#endif // FL_WINAPI_SYSTEM_DRIVER_H + +// +// End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $". +// diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index 301edbf2a..031b0aac2 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_WinAPI_System_Driver.h" +#include "Fl_WinAPI_System_Driver.H" // diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx index b11b0ee00..c8d18a6c5 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_WinAPI_Window_Driver.h" +#include "Fl_WinAPI_Window_Driver.H" Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w) diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index 9afe4dda3..6cf07e380 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_X11_Screen_Driver.h" +#include "Fl_X11_Screen_Driver.H" #include <FL/Fl.H> #include <FL/x.H> #include <FL/fl_ask.H> diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.h b/src/drivers/X11/Fl_X11_Window_Driver.H index 6e4113ef1..36c5b67cb 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.h +++ b/src/drivers/X11/Fl_X11_Window_Driver.H @@ -1,7 +1,7 @@ // // "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $" // -// Definition of Apple Cocoa window driver +// Definition of X11 window driver // for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2016 by Bill Spitzak and others. @@ -18,12 +18,12 @@ // /** - \file Fl_WinAPI_Window_Driver.h - \brief Definition of MSWindows window driver. + \file Fl_X11_Window_Driver.H + \brief Definition of X11 window driver. */ -#ifndef FL_WINAPI_WINDOW_DRIVER_H -#define FL_WINAPI_WINDOW_DRIVER_H +#ifndef FL_X11_WINDOW_DRIVER_H +#define FL_X11_WINDOW_DRIVER_H #include <FL/Fl_Window_Driver.H> @@ -42,15 +42,16 @@ ? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx? */ -class FL_EXPORT Fl_WinAPI_Window_Driver : public Fl_Window_Driver +class FL_EXPORT Fl_X11_Window_Driver : public Fl_Window_Driver { public: - Fl_WinAPI_Window_Driver(Fl_Window*); + Fl_X11_Window_Driver(Fl_Window*); + virtual void take_focus(); }; -#endif // FL_WINAPI_WINDOW_DRIVER_H +#endif // FL_X11_WINDOW_DRIVER_H // // End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $". diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index e145d99c6..0da90b246 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -18,7 +18,7 @@ #include "../../config_lib.h" -#include "Fl_X11_Window_Driver.h" +#include "Fl_X11_Window_Driver.H" Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w) |
