Rename remaining src/drivers/XXX.h to XXX.H - continued

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2016-02-26 16:18:27 +00:00
parent 6287426b65
commit 83dddfbfab
9 changed files with 104 additions and 324 deletions

View File

@ -1,50 +0,0 @@
//
// "$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 $".
//

View File

@ -1,7 +1,7 @@
//
// "$Id$"
//
// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
// 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.
@ -18,32 +18,37 @@
//
/**
\file Fl_Xlib_Graphics_Driver.h
\brief Definition of X11 Xlib graphics driver.
\file Fl_GDI_Graphics_Driver.H
\brief Definition of MSWindows GDI graphics driver.
*/
#ifndef FL_CFG_GFX_XLIB_H
#define FL_CFG_GFX_XLIB_H
#ifndef FL_GDI_GRAPHICS_DRIVER_H
#define FL_GDI_GRAPHICS_DRIVER_H
#include <FL/Fl_Graphics_Driver.H>
#include <windows.h>
/**
\brief The Xlib-specific graphics class.
\brief The MSWindows-specific graphics class.
*
This class is implemented only on the Xlib platform.
This class is implemented only on the MSWindows platform.
*/
class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Graphics_Driver {
class FL_EXPORT Fl_GDI_Graphics_Driver : public Fl_Graphics_Driver {
protected:
static GC gc_;
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_Xlib_Graphics_Driver(void);
Fl_GDI_Graphics_Driver() {mask_bitmap_ = NULL;}
virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
virtual void *gc() { return gc_; }
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);
@ -66,14 +71,15 @@ public:
void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
int height();
int descent();
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
#if ! defined(FL_DOXYGEN)
void copy_offscreen_with_alpha(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
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/xlib_rect.cxx
// --- 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);
@ -118,8 +124,29 @@ protected:
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);
};
#endif // FL_CFG_GFX_XLIB_H
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$".

View File

@ -0,0 +1,37 @@
//
// "$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$".
//

View File

@ -1,102 +0,0 @@
//
// "$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$".
//

View File

@ -1,50 +0,0 @@
//
// "$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 $".
//

View File

@ -1,34 +0,0 @@
//
// "$Id$"
//
// Definition of class Fl_Quartz_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 Fl_Quartz_Disply_Device.h
\brief Implement a connection between the Cocoa window management and the
Quartz graphics driver on OS X.
*/
#ifndef FL_QUARTZ_DISPLAY_DEVICE_H
#define FL_QUARTZ_DISPLAY_DEVICE_H
// FIXME: implement this
#endif // FL_QUARTZ_DISPLAY_DEVICE_H
//
// End of "$Id$".
//

View File

@ -1,50 +0,0 @@
//
// "$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 $".
//

View File

@ -1,7 +1,7 @@
//
// "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $"
//
// Definition of X11 window driver
// Definition of Apple Cocoa window driver
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2016 by Bill Spitzak and others.
@ -18,12 +18,12 @@
//
/**
\file Fl_Cocoa_Window_Driver.h
\brief Definition of X11 window driver.
\file Fl_WinAPI_Window_Driver.H
\brief Definition of MSWindows window driver.
*/
#ifndef FL_X11_WINDOW_DRIVER_H
#define FL_X11_WINDOW_DRIVER_H
#ifndef FL_WINAPI_WINDOW_DRIVER_H
#define FL_WINAPI_WINDOW_DRIVER_H
#include <FL/Fl_Window_Driver.H>
@ -42,16 +42,15 @@
? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx?
*/
class FL_EXPORT Fl_X11_Window_Driver : public Fl_Window_Driver
class FL_EXPORT Fl_WinAPI_Window_Driver : public Fl_Window_Driver
{
public:
Fl_X11_Window_Driver(Fl_Window*);
virtual void take_focus();
Fl_WinAPI_Window_Driver(Fl_Window*);
};
#endif // FL_X11_WINDOW_DRIVER_H
#endif // FL_WINAPI_WINDOW_DRIVER_H
//
// End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $".

View File

@ -1,7 +1,7 @@
//
// "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $"
//
// Definition of MSWindows Win32/64 Screen interface
// Definition of X11 Screen interface
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2016 by Bill Spitzak and others.
@ -18,34 +18,37 @@
//
/**
\file Fl_WinAPI_Screen_Driver.h
\brief Definition of MSWindows Win32/64 Screen interface.
\file Fl_X11_Screen_Driver.H
\brief Definition of X11 Screen interface
*/
#ifndef FL_WINAPI_SCREEN_DRIVER_H
#define FL_WINAPI_SCREEN_DRIVER_H
#ifndef FL_X11_SCREEN_DRIVER_H
#define FL_X11_SCREEN_DRIVER_H
#include <FL/Fl_Screen_Driver.H>
#include <FL/x.H>
class Fl_Window;
class FL_EXPORT Fl_WinAPI_Screen_Driver : public Fl_Screen_Driver
class FL_EXPORT Fl_X11_Screen_Driver : public Fl_Screen_Driver
{
protected:
RECT screens[MAX_SCREENS];
RECT work_area[MAX_SCREENS];
typedef struct {
short x_org;
short y_org;
short width;
short height;
} FLScreenInfo;
FLScreenInfo screens[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();
@ -68,7 +71,7 @@ public:
};
#endif // FL_WINAPI_SCREEN_DRIVER_H
#endif // FL_X11_SCREEN_DRIVER_H
//
// End of "$Id: quartz.H 11017 2016-01-20 21:40:12Z matt $".