summaryrefslogtreecommitdiff
path: root/src/drivers/Pico
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-01-23 01:33:47 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-01-23 18:12:47 +0100
commit04ccc8cc46c45b81e6138bec0b48a188c4ffe406 (patch)
tree3ad8604f5d433dc6b6c294c28549a58dd57efcbd /src/drivers/Pico
parentb275ff07158e80d1744ddb2f6c51094a87cf079a (diff)
Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule" https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
Diffstat (limited to 'src/drivers/Pico')
-rw-r--r--src/drivers/Pico/Fl_Pico_Copy_Surface.cxx1
-rw-r--r--src/drivers/Pico/Fl_Pico_Graphics_Driver.H211
-rw-r--r--src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx506
-rw-r--r--src/drivers/Pico/Fl_Pico_Image_Surface.cxx1
-rw-r--r--src/drivers/Pico/Fl_Pico_Screen_Driver.H58
-rw-r--r--src/drivers/Pico/Fl_Pico_Screen_Driver.cxx132
-rw-r--r--src/drivers/Pico/Fl_Pico_System_Driver.H32
-rw-r--r--src/drivers/Pico/Fl_Pico_System_Driver.cxx19
-rw-r--r--src/drivers/Pico/Fl_Pico_Window_Driver.H41
-rw-r--r--src/drivers/Pico/Fl_Pico_Window_Driver.cxx46
10 files changed, 0 insertions, 1047 deletions
diff --git a/src/drivers/Pico/Fl_Pico_Copy_Surface.cxx b/src/drivers/Pico/Fl_Pico_Copy_Surface.cxx
deleted file mode 100644
index 8b1378917..000000000
--- a/src/drivers/Pico/Fl_Pico_Copy_Surface.cxx
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/drivers/Pico/Fl_Pico_Graphics_Driver.H b/src/drivers/Pico/Fl_Pico_Graphics_Driver.H
deleted file mode 100644
index 93550f80c..000000000
--- a/src/drivers/Pico/Fl_Pico_Graphics_Driver.H
+++ /dev/null
@@ -1,211 +0,0 @@
-//
-// Definition of the Pico minimal graphics 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/**
- \file Fl_Pico_Graphics_Driver.H
- \brief Definition of Pico minimal graphics driver.
- */
-
-#ifndef FL_PICO_GRAPHICS_DRIVER_H
-#define FL_PICO_GRAPHICS_DRIVER_H
-
-#include <FL/Fl_Graphics_Driver.H>
-
-
-/**
- \brief The Pico minimal graphics class.
-
- This class is implemented as a base class for minimal core drivers.
- */
-class Fl_Pico_Graphics_Driver : public Fl_Graphics_Driver {
-// friend class Fl_Surface_Device;
-// friend class Fl_Pixmap;
-// friend class Fl_Bitmap;
-// friend class Fl_RGB_Image;
-// friend int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg);
-//public:
-// // The following functions create the various graphics drivers that are required
-// // for core operations. They must be implemented as members of Fl_Graphics_Driver,
-// // but located in the device driver module that is linked to the core library
-// static Fl_Graphics_Driver *newMainGraphicsDriver();
-// //static Fl_Graphics_Driver *newOpenGLGraphicsDriver();
-// //static Fl_Graphics_Driver *newPrinterGraphicsDriver();
-// //static Fl_Graphics_Driver *new...;
-//public:
-// /** A 2D coordinate transformation matrix */
-// struct matrix {double a, b, c, d, x, y;};
-// /** Features that a derived class may possess. */
-// typedef enum {
-// NATIVE = 1, /**< native graphics driver for the platform */
-// PRINTER = 2 /**< graphics driver for a printer drawing surface */
-// } driver_feature;
-//
-// int fl_clip_state_number;
-//protected:
-// static const matrix m0;
-// Fl_Font font_; // current font
-// Fl_Fontsize size_; // current font size
-// Fl_Color color_; // current color
-// int sptr;
-// static const int matrix_stack_size = FL_MATRIX_STACK_SIZE;
-// matrix stack[FL_MATRIX_STACK_SIZE];
-// matrix m;
-// int n, p_size, gap_;
-// XPOINT *p;
-// int what;
-// int rstackptr;
-// static const int region_stack_max = FL_REGION_STACK_SIZE - 1;
-// Fl_Region rstack[FL_REGION_STACK_SIZE];
-// Fl_Font_Descriptor *font_descriptor_;
-//#ifndef FL_DOXYGEN
-// enum {LINE, LOOP, POLYGON, POINT_};
-// inline int vertex_no() { return n; }
-// inline XPOINT *vertices() {return p;}
-// inline int vertex_kind() {return what;}
-//#endif
-// matrix *fl_matrix; /**< Points to the current coordinate transformation matrix */
-//
-//public:
-// Fl_Graphics_Driver();
-// virtual ~Fl_Graphics_Driver() { if (p) free(p); }
-// virtual char can_do_alpha_blending() { return 0; }
-// // --- implementation is in src/fl_rect.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_rect.cxx
- virtual void point(int x, int y);
- virtual void rect(int x, int y, int w, int h);
-// virtual void focus_rect(int x, int y, int w, int h);
- virtual void rectf(int x, int y, int w, int h);
- virtual void line(int x, int y, int x1, int y1);
- virtual void line(int x, int y, int x1, int y1, int x2, int y2);
- virtual void xyline(int x, int y, int x1);
- virtual void xyline(int x, int y, int x1, int y2);
- virtual void xyline(int x, int y, int x1, int y2, int x3) ;
- virtual void yxline(int x, int y, int y1) ;
- virtual void yxline(int x, int y, int y1, int x2) ;
- virtual void yxline(int x, int y, int y1, int x2, int y3) ;
- virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2) ;
- virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) ;
- virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2) ;
- virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) ;
-// // --- clipping
- virtual void push_clip(int x, int y, int w, int h) ;
- virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) ;
- virtual int not_clipped(int x, int y, int w, int h) ;
- virtual void push_no_clip() ;
- virtual void pop_clip() ;
-// virtual Fl_Region clip_region(); // has default implementation
-// virtual void clip_region(Fl_Region r); // has default implementation
-// virtual void restore_clip();
-// // --- implementation is in src/fl_vertex.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_vertex.cxx
-// virtual void push_matrix();
-// virtual void pop_matrix();
-// virtual void mult_matrix(double a, double b, double c, double d, double x, double y);
-// virtual void rotate(double d);
-// virtual void scale(double x, double y);
-// virtual void scale(double x);
-// virtual void translate(double x,double y);
- virtual void begin_points();
- virtual void begin_line();
- virtual void begin_loop();
- virtual void begin_polygon();
- virtual void begin_complex_polygon() ;
-// virtual double transform_x(double x, double y);
-// virtual double transform_y(double x, double y);
-// virtual double transform_dx(double x, double y);
-// virtual double transform_dy(double x, double y);
- virtual void transformed_vertex(double xf, double yf) ;
- virtual void vertex(double x, double y) ;
- virtual void end_points() ;
- virtual void end_line() ;
- virtual void end_loop() ;
- virtual void end_polygon() ;
- virtual void end_complex_polygon() ;
- virtual void gap() ;
- virtual void circle(double x, double y, double r) ;
-// // --- implementation is in src/fl_arc.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_arc.cxx if needed
-// virtual void arc(double x, double y, double r, double start, double end);
-// // --- implementation is in src/fl_arci.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_arci.cxx
- virtual void arc(int x, int y, int w, int h, double a1, double a2) ;
- virtual void pie(int x, int y, int w, int h, double a1, double a2) ;
-// // --- implementation is in src/fl_curve.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_curve.cxx if needed
-// virtual void curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3);
-// // --- implementation is in src/fl_line_style.cxx which includes src/cfg_gfx/xxx_line_style.cxx
- virtual 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
-// virtual void color(Fl_Color c) { color_ = c; }
-// virtual Fl_Color color() { return color_; }
- virtual void color(uchar r, uchar g, uchar b) ;
-// // --- implementation is in src/fl_font.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_font.cxx
- virtual void draw(const char *str, int n, int x, int y) ;
-// virtual void draw(const char *str, int n, float x, float y) { draw(str, n, (int)(x+0.5), (int)(y+0.5));}
-// virtual void draw(int angle, const char *str, int n, int x, int y) { draw(str, n, x, y); }
-// virtual void rtl_draw(const char *str, int n, int x, int y) { draw(str, n, x, y); }
-// /** Returns non-zero if the graphics driver possesses the \p feature */
-// virtual int has_feature(driver_feature feature) { return 0; }
-// virtual void font(Fl_Font face, Fl_Fontsize fsize) {font_ = face; size_ = fsize;}
-// virtual Fl_Font font() {return font_; }
-// virtual Fl_Fontsize size() {return size_; }
- virtual double width(const char *str, int n);
-// virtual double width(unsigned int c) { char ch = (char)c; return width(&ch, 1); }
- virtual int height();
- virtual int descent();
-// virtual Fl_Font_Descriptor *font_descriptor() { return font_descriptor_;}
-// virtual void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;}
-// // --- implementation is in src/fl_image.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_font.cxx
- virtual Fl_Bitmask create_bitmask(int w, int h, const uchar *array) ;
-// virtual void cache(Fl_Pixmap *img) { return 0; }
-// virtual void cache(Fl_Bitmap *img) { return 0; }
-// virtual void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) { }
- virtual void delete_bitmask(Fl_Bitmask bm) ;
-// virtual void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) {}
-// virtual void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) {}
-// virtual void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) {}
-// virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) {}
-// /** \brief Draws an Fl_RGB_Image object to the device.
-// *
-// Specifies a bounding box for the image, with the origin (upper left-hand corner) of
-// the image offset by the cx and cy arguments.
-// */
-// virtual void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) {}
-// /** \brief Draws an Fl_Pixmap object to the device.
-// *
-// Specifies a bounding box for the image, with the origin (upper left-hand corner) of
-// the image offset by the cx and cy arguments.
-// */
-// virtual void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) {}
-// /** \brief Draws an Fl_Bitmap object to the device.
-// *
-// Specifies a bounding box for the image, with the origin (upper left-hand corner) of
-// the image offset by the cx and cy arguments.
-// */
-// virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {}
-// virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
-//
-// /** Sets the value of the driver-specific graphics context. */
-// virtual void gc(void*) {}
-// /** Returns the driver-specific graphics context, of NULL if there's none. */
-// virtual void *gc(void) {return NULL;}
-// /** Support for pixmap drawing */
-// virtual uchar **mask_bitmap() { return 0; }
-// /** Support for pixmap drawing */
-// virtual void mask_bitmap(uchar **) {}
-//protected:
-// // --- 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 fixloop();
-};
-
-#endif // FL_PICO_GRAPHICS_DRIVER_H
diff --git a/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx b/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx
deleted file mode 100644
index cf0928c25..000000000
--- a/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx
+++ /dev/null
@@ -1,506 +0,0 @@
-//
-// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 1998-2020 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-
-#include <config.h>
-#include "Fl_Pico_Graphics_Driver.H"
-#include <FL/fl_draw.H>
-#include <FL/math.h>
-
-
-static int sign(int x) { return (x>0)-(x<0); }
-
-
-void Fl_Pico_Graphics_Driver::point(int x, int y)
-{
- // This is the one method that *must* be overridden in the final driver
- // class. All other methods can be derived from this one method. The
- // result should work, but will be slow and inefficient.
-}
-
-
-void Fl_Pico_Graphics_Driver::rect(int x, int y, int w, int h)
-{
- int x1 = x+w-1, y1 = y+h-1;
- xyline(x, y, x1);
- xyline(x, y1, x1);
- yxline(x, y, y1);
- yxline(x1, y, y1);
-}
-
-
-void Fl_Pico_Graphics_Driver::rectf(int x, int y, int w, int h)
-{
- int i = y, n = y+h, xn = x+w-1;
- for ( ; i<n; i++) {
- xyline(x, i, xn);
- }
-}
-
-
-void Fl_Pico_Graphics_Driver::line(int x, int y, int x1, int y1)
-{
- if (x==x1) {
- return yxline(x, y, y1);
- }
- if (y==y1) {
- return xyline(x, y, x1);
- }
- // Bresenham
- int w = x1 - x, dx = abs(w);
- int h = y1 - y, dy = abs(h);
- int dx1 = sign(w), dy1 = sign(h), dx2, dy2;
- int min, max;
- if (dx < dy) {
- min = dx; max = dy;
- dx2 = 0;
- dy2 = dy1;
- } else {
- min = dy; max = dx;
- dx2 = dx1;
- dy2 = 0;
- }
- int num = max/2;
- for (int i=max+1; i>0; i--) {
- point(x, y);
- num += min;
- if (num>=max) {
- num -= max;
- x += dx1;
- y += dy1;
- } else {
- x += dx2;
- y += dy2;
- }
- }
-}
-
-
-void Fl_Pico_Graphics_Driver::line(int x, int y, int x1, int y1, int x2, int y2)
-{
- line(x, y, x1, y1);
- line(x1, y1, x2, y2);
-}
-
-
-void Fl_Pico_Graphics_Driver::xyline(int x, int y, int x1)
-{
- int i;
- if (x1<x) {
- int tmp = x; x = x1; x1 = tmp;
- }
- for (i=x; i<=x1; i++) {
- point(i, y);
- }
-}
-
-
-void Fl_Pico_Graphics_Driver::xyline(int x, int y, int x1, int y2)
-{
- xyline(x, y, x1);
- yxline(x1, y, y2);
-}
-
-
-void Fl_Pico_Graphics_Driver::xyline(int x, int y, int x1, int y2, int x3)
-{
- xyline(x, y, x1);
- yxline(x1, y, y2);
- xyline(x1, y2, x3);
-}
-
-
-void Fl_Pico_Graphics_Driver::yxline(int x, int y, int y1)
-{
- int i;
- if (y1<y) {
- int tmp = y; y = y1; y1 = tmp;
- }
- for (i=y; i<=y1; i++) {
- point(x, i);
- }
-}
-
-
-void Fl_Pico_Graphics_Driver::yxline(int x, int y, int y1, int x2)
-{
- yxline(x, y, y1);
- xyline(x, y1, x2);
-}
-
-
-void Fl_Pico_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3)
-{
- yxline(x, y, y1);
- xyline(x, y1, x2);
- yxline(x2, y1, y3);
-}
-
-
-void Fl_Pico_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2)
-{
- line(x0, y0, x1, y1);
- line(x1, y1, x2, y2);
- line(x2, y2, x0, y0);
-}
-
-
-void Fl_Pico_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
-{
- line(x0, y0, x1, y1);
- line(x1, y1, x2, y2);
- line(x2, y2, x3, y3);
- line(x3, y3, x0, y0);
-}
-
-
-void Fl_Pico_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2, int y2)
-{
- // FIXME: fill
- line(x0, y0, x1, y1);
- line(x1, y1, x2, y2);
- line(x2, y2, x0, y0);
-}
-
-
-void Fl_Pico_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
-{
- // FIXME: fill
- line(x0, y0, x1, y1);
- line(x1, y1, x2, y2);
- line(x2, y2, x3, y3);
- line(x3, y3, x0, y0);
-}
-
-
-void Fl_Pico_Graphics_Driver::push_clip(int x, int y, int w, int h)
-{
-}
-
-
-int Fl_Pico_Graphics_Driver::clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
-{
- X = x; Y = y; W = w; H = h;
- return 0;
-}
-
-
-int Fl_Pico_Graphics_Driver::not_clipped(int x, int y, int w, int h)
-{
- return 1;
-}
-
-
-void Fl_Pico_Graphics_Driver::push_no_clip()
-{
-}
-
-
-void Fl_Pico_Graphics_Driver::pop_clip()
-{
-}
-
-
-static double px, py; // FIXME: aaaah!
-static double pxf, pyf;
-static int pn;
-
-
-void Fl_Pico_Graphics_Driver::begin_points()
-{
- what = POINT_;
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::begin_complex_polygon()
-{
- what = POLYGON;
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::begin_line()
-{
- what = LINE;
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::begin_loop()
-{
- what = LOOP;
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::begin_polygon()
-{
- what = POLYGON;
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::transformed_vertex(double x, double y)
-{
- if (pn>0) {
- switch (what) {
- case POINT_: point(x, y); break;
- case LINE: line(px, py, x, y); break;
- case LOOP: line(px, py, x, y); break;
- case POLYGON: line(px, py, x, y); break; // FIXME: fill!
- }
- }
- if (pn==0 ) { pxf = x; pyf = y; }
- px = x; py = y;
- pn++;
-}
-
-
-void Fl_Pico_Graphics_Driver::vertex(double x, double y)
-{
- transformed_vertex(x*m.a + y*m.c + m.x, x*m.b + y*m.d + m.y);
-}
-
-
-void Fl_Pico_Graphics_Driver::end_points()
-{
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::end_line()
-{
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::end_loop()
-{
- line(px, py, pxf, pyf);
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::end_polygon()
-{
- line(px, py, pxf, pyf); // FIXME: fill!
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::end_complex_polygon()
-{
- line(px, py, pxf, pyf); // FIXME: fill!
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::gap()
-{
- pn = 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::circle(double x, double y, double r)
-{
- begin_loop();
- double X = r;
- double Y = 0;
- fl_vertex(x+X,y+Y);
-
- double rx = fabs(transform_dx(r, r));
- double ry = fabs(transform_dy(r, r));
-
- double circ = M_PI*0.5*(rx+ry);
- int segs = circ * 360 / 1000; // every line is about three pixels long
- if (segs<16) segs = 16;
-
- double A = 2*M_PI;
- int i = segs;
-
- if (i) {
- double epsilon = A/i; // Arc length for equal-size steps
- double cos_e = cos(epsilon); // Rotation coefficients
- double sin_e = sin(epsilon);
- do {
- double Xnew = cos_e*X + sin_e*Y;
- Y = -sin_e*X + cos_e*Y;
- fl_vertex(x + (X=Xnew), y + Y);
- } while (--i);
- }
- end_loop();
-}
-
-
-void Fl_Pico_Graphics_Driver::arc(int xi, int yi, int w, int h, double a1, double a2)
-{
- if (a2<=a1) return;
-
- double rx = w/2.0;
- double ry = h/2.0;
- double x = xi + rx;
- double y = yi + ry;
- double circ = M_PI*0.5*(rx+ry);
- int i, segs = circ * (a2-a1) / 1000; // every line is about three pixels long
- if (segs<3) segs = 3;
-
- int px, py;
- a1 = a1/180*M_PI;
- a2 = a2/180*M_PI;
- double step = (a2-a1)/segs;
-
- int nx = x + sin(a1)*rx;
- int ny = y - cos(a1)*ry;
- for (i=segs; i>0; i--) {
- a1+=step;
- px = nx; py = ny;
- nx = x + sin(a1)*rx;
- ny = y - cos(a1)*ry;
- line(px, py, nx, ny);
- }
-}
-
-
-void Fl_Pico_Graphics_Driver::pie(int x, int y, int w, int h, double a1, double a2)
-{
- // FIXME: implement this
-}
-
-
-void Fl_Pico_Graphics_Driver::line_style(int style, int width, char* dashes)
-{
-}
-
-
-void Fl_Pico_Graphics_Driver::color(uchar r, uchar g, uchar b)
-{
-}
-
-
-Fl_Bitmask Fl_Pico_Graphics_Driver::create_bitmask(int w, int h, const uchar *array)
-{
- return 0;
-}
-
-
-void Fl_Pico_Graphics_Driver::delete_bitmask(Fl_Bitmask bm)
-{
-}
-
-
-
-/*
- |01234567|
- -+--------+
- 0| |____
- 1|++++++++|font
- 2|++++++++|
- 3|++++++++|
- 4|++++++++|
- 5|++++++++|____
- 6| |descent
- 7| |
- -+--------+
- */
-
-
-static const char *font_data[128] = {
- /*00*/0, /*01*/0, /*02*/0, /*03*/0,
- /*04*/0, /*05*/0, /*06*/0, /*07*/0,
- /*08*/0, /*09*/0, /*0A*/0, /*0B*/0,
- /*0C*/0, /*0D*/0, /*0E*/0, /*0F*/0,
- /*10*/0, /*11*/0, /*12*/0, /*13*/0,
- /*14*/0, /*15*/0, /*16*/0, /*17*/0,
- /*18*/0, /*19*/0, /*1A*/0, /*1B*/0,
- /*1C*/0, /*1D*/0, /*1E*/0, /*1F*/0,
- /* */0, /*!*/"\31\34\100\35\36", /*"*/"\31\22\100\51\42", /*#*/"\31\15\100\61\45\100\12\72\100\04\64",
- /*$*/"\62\51\11\02\13\53\64\55\15\04\100\30\36", /*%*/"\21\11\02\13\23\32\21\100\15\51\100\34\43\53\64\55\45\34", /*&*/"\63\45\15\04\13\52\41\21\12\65", /*'*/"\31\22",
- /*(*/"\51\32\23\24\35\56", /*)*/"\21\42\53\54\45\26", /***/"\31\33\15\100\33\55\100\02\33\62", /*+*/"\35\31\100\03\63",
- /*,*/"\35\45\36", /*-*/"\13\53", /*.*/"\35\36", /* / */"\51\15",
- /*0*/"\21\12\14\25\55\64\62\51\21\100\24\52", /*1*/"\22\41\45", /*2*/"\12\21\51\62\53\24\15\65", /*3*/"\12\21\51\62\53\64\55\25\14\100\53\33",
- /*4*/"\55\51\04\64", /*5*/"\14\25\55\64\53\13\21\61", /*6*/"\62\51\21\12\14\25\55\64\53\13", /*7*/"\11\61\33\25",
- /*8*/"\12\21\51\62\53\64\55\25\14\23\12\100\23\53", /*9*/"\14\25\55\64\62\51\21\12\23\63", /*:*/"\32\33\100\35\36", /*;*/"\32\33\100\25\35\26",
- /*<*/"\62\13\64", /*=*/"\12\62\100\14\64", /*>*/"\12\63\14", /*?*/"\12\21\51\62\43\34\35\100\36\37",
- /*@*/"\56\16\05\02\11\51\62\64\55\35\24\23\32\52\63", /*A*/"\05\31\65\100\14\54", /*B*/"\11\51\62\53\64\55\15\11\100\13\53", /*C*/"\62\51\11\02\04\15\55\64",
- /*D*/"\11\51\62\64\55\15\11", /*E*/"\61\11\15\65\100\13\53", /*F*/"\61\11\15\100\13\53", /*G*/"\62\51\11\02\04\15\55\64\63\33",
- /*H*/"\11\15\100\61\65\100\13\63", /*I*/"\21\41\100\25\45\100\35\31", /*J*/"\51\54\45\15\04", /*K*/"\11\15\100\14\61\100\65\33",
- /*L*/"\11\15\65", /*M*/"\05\01\35\61\65", /*N*/"\05\01\65\61", /*O*/"\02\11\51\62\64\55\15\04\02",
- /*P*/"\15\11\51\62\53\13", /*Q*/"\02\11\51\62\64\55\15\04\02\100\65\34", /*R*/"\15\11\51\62\53\13\100\33\65", /*S*/"\62\51\11\02\13\53\64\55\15\04",
- /*T*/"\01\61\100\31\35", /*U*/"\61\64\55\15\04\01", /*V*/"\01\35\61", /*W*/"\01\15\31\55\61",
- /*X*/"\01\65\100\05\61", /*Y*/"\01\33\35\100\33\61", /*Z*/"\01\61\05\65", /*[*/"\51\31\36\56",
- /*\*/"\21\55", /*]*/"\21\41\46\26", /*^*/"\13\31\53", /*_*/"\06\76",
- /*`*/"\31\42", /*a*/"\22\52\63\65\100\63\23\14\25\55\64", /*b*/"\11\15\100\14\25\55\64\63\52\22\13", /*c*/"\63\52\22\13\14\25\55\64",
- /*d*/"\61\65\100\64\55\25\14\13\22\52\63", /*e*/"\64\63\52\22\13\14\25\55\100\64\14", /*f*/"\35\32\41\51\100\22\52", /*g*/"\62\65\56\26\100\63\52\22\13\14\25\55\64",
- /*h*/"\11\15\100\65\63\52\22\13", /*i*/"\31\32\100\33\100\23\33\35\100\25\45", /*j*/"\31\32\100\33\35\26\16", /*k*/"\11\15\100\14\62\100\33\65",
- /*l*/"\31\34\45\55", /*m*/"\05\02\100\03\12\22\33\35\100\33\42\52\63\65", /*n*/"\12\15\100\13\22\52\63\65", /*o*/"\22\13\14\25\55\64\63\52\22",
- /*p*/"\16\12\100\13\22\52\63\64\55\25\14", /*q*/"\62\66\100\63\52\22\13\14\25\55\64", /*r*/"\22\25\100\23\32\42\53", /*s*/"\63\52\22\13\64\55\25\14",
- /*t*/"\31\34\45\55\100\22\42", /*u*/"\12\14\25\55\64\62\100\64\65", /*v*/"\62\35\02", /*w*/"\02\15\32\55\62",
- /*x*/"\62\15\100\65\12", /*y*/"\12\45\62\100\45\36\16", /*z*/"\12\62\15\65", /*{*/"\51\41\32\33\24\35\36\47\57\100\14\24",
- /*|*/"\31\37", /*}*/"\21\31\42\43\54\64\100\54\45\46\37\27", /*~*/"\12\21\31\42\52\61", /*7F*/0
-};
-
-
-double Fl_Pico_Graphics_Driver::width(const char *str, int n) {
- return size_*n*0.5;
-}
-
-
-int Fl_Pico_Graphics_Driver::descent() {
- return (int)(size_ - size_*0.8);
-}
-
-
-int Fl_Pico_Graphics_Driver::height() {
- return (int)(size_);
-}
-
-
-void Fl_Pico_Graphics_Driver::draw(const char *str, int n, int x, int y)
-{
- int i;
- for (i=0; i<n; i++) {
- char c = str[i] & 0x7f;
- const char *fd = font_data[(int)c];
- if (fd) {
- char rendering = 0;
- float px=0.0f, py=0.0f;
- for (;;) {
- char cmd = *fd++;
- if (cmd==0) {
- if (rendering) {
- end_line();
- rendering = 0;
- }
- break;
- } else if (cmd>63) {
- if (cmd=='\100' && rendering) {
- end_line();
- rendering = 0;
- }
- } else {
- if (!rendering) { begin_line(); rendering = 1; }
- int vx = (cmd & '\70')>>3;
- int vy = (cmd & '\07');
- px = (int)(0.5+x+vx*size_*0.5/8.0);
- py = (int)(0.5+y+vy*size_/8.0-0.8*size_);
- vertex(px, py);
- }
- }
- }
- x += size_*0.5;
- }
-}
diff --git a/src/drivers/Pico/Fl_Pico_Image_Surface.cxx b/src/drivers/Pico/Fl_Pico_Image_Surface.cxx
deleted file mode 100644
index 8b1378917..000000000
--- a/src/drivers/Pico/Fl_Pico_Image_Surface.cxx
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/drivers/Pico/Fl_Pico_Screen_Driver.H b/src/drivers/Pico/Fl_Pico_Screen_Driver.H
deleted file mode 100644
index 7f03cb60f..000000000
--- a/src/drivers/Pico/Fl_Pico_Screen_Driver.H
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Definition of Pico Screen interface
-// 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/**
- \file Fl_Pico_Screen_Driver.H
- \brief Definition of Pico Screen interface.
- */
-
-#ifndef FL_PICO_SCREEN_DRIVER_H
-#define FL_PICO_SCREEN_DRIVER_H
-
-#include "../../Fl_Screen_Driver.H"
-
-
-class FL_EXPORT Fl_Pico_Screen_Driver : public Fl_Screen_Driver
-{
-public:
- Fl_Pico_Screen_Driver();
- virtual ~Fl_Pico_Screen_Driver();
- virtual void init();
- virtual int x();
- virtual int y();
- virtual int w();
- virtual int h();
- virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n);
- virtual void screen_dpi(float &h, float &v, int n=0);
- virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
- // --- audible output
- virtual void beep(int type);
- // --- global events
- virtual void flush();
- virtual int ready();
- virtual void grab(Fl_Window* win);
- // --- global colors
- virtual void get_system_colors();
- // --- global timers
- virtual void add_timeout(double time, Fl_Timeout_Handler cb, void *argp);
- virtual void repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp);
- virtual int has_timeout(Fl_Timeout_Handler cb, void *argp);
- virtual void remove_timeout(Fl_Timeout_Handler cb, void *argp);
-};
-
-
-#endif // FL_PICO_SCREEN_DRIVER_H
diff --git a/src/drivers/Pico/Fl_Pico_Screen_Driver.cxx b/src/drivers/Pico/Fl_Pico_Screen_Driver.cxx
deleted file mode 100644
index 615624006..000000000
--- a/src/drivers/Pico/Fl_Pico_Screen_Driver.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-//
-// Definition of SDL Screen interface based on Pico
-//
-// 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-
-#include <config.h>
-#include "Fl_Pico_Screen_Driver.H"
-
-
-
-Fl_Pico_Screen_Driver::Fl_Pico_Screen_Driver()
-{
-}
-
-
-Fl_Pico_Screen_Driver::~Fl_Pico_Screen_Driver()
-{
-}
-
-
-void Fl_Pico_Screen_Driver::init()
-{
- // nothing to do yet
-}
-
-
-int Fl_Pico_Screen_Driver::x()
-{
- return 0;
-}
-
-
-int Fl_Pico_Screen_Driver::y()
-{
- return 0;
-}
-
-
-int Fl_Pico_Screen_Driver::w()
-{
- return 800;
-}
-
-
-int Fl_Pico_Screen_Driver::h()
-{
- return 600;
-}
-
-
-void Fl_Pico_Screen_Driver::screen_xywh(int &X, int &Y, int &W, int &H, int n)
-{
- X = x();
- Y = y();
- W = w();
- H = h();
-}
-
-
-void Fl_Pico_Screen_Driver::screen_dpi(float &h, float &v, int n)
-{
- h = 75.0;
- v = 75.0;
-}
-
-
-void Fl_Pico_Screen_Driver::screen_work_area(int &X, int &Y, int &W, int &H, int n)
-{
- X = x();
- Y = y();
- W = w();
- H = h();
-}
-
-
-void Fl_Pico_Screen_Driver::beep(int type)
-{
-}
-
-
-void Fl_Pico_Screen_Driver::flush()
-{
-}
-
-
-int Fl_Pico_Screen_Driver::ready()
-{
- return 1;
-}
-
-
-void Fl_Pico_Screen_Driver::grab(Fl_Window* win)
-{
-}
-
-
-void Fl_Pico_Screen_Driver::get_system_colors()
-{
-}
-
-
-void Fl_Pico_Screen_Driver::add_timeout(double time, Fl_Timeout_Handler cb, void *argp)
-{
-}
-
-
-void Fl_Pico_Screen_Driver::repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp)
-{
-}
-
-
-int Fl_Pico_Screen_Driver::has_timeout(Fl_Timeout_Handler cb, void *argp)
-{
- return 0;
-}
-
-
-void Fl_Pico_Screen_Driver::remove_timeout(Fl_Timeout_Handler cb, void *argp)
-{
-}
diff --git a/src/drivers/Pico/Fl_Pico_System_Driver.H b/src/drivers/Pico/Fl_Pico_System_Driver.H
deleted file mode 100644
index 5e3551b4c..000000000
--- a/src/drivers/Pico/Fl_Pico_System_Driver.H
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Definition of Pico 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-#ifndef FL_PICO_SYSTEM_DRIVER_H
-#define FL_PICO_SYSTEM_DRIVER_H
-
-#include "../../Fl_System_Driver.H"
-
-class Fl_Pico_System_Driver : public Fl_System_Driver {
-public:
- Fl_Pico_System_Driver() : Fl_System_Driver() {}
- virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0);
- virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0);
- virtual void remove_fd(int, int when);
- virtual void remove_fd(int);
-};
-
-#endif /* FL_PICO_SYSTEM_DRIVER_H */
diff --git a/src/drivers/Pico/Fl_Pico_System_Driver.cxx b/src/drivers/Pico/Fl_Pico_System_Driver.cxx
deleted file mode 100644
index 1dfb262ab..000000000
--- a/src/drivers/Pico/Fl_Pico_System_Driver.cxx
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Definition of Pico 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-#include "Fl_Pico_System_Driver.H"
-#include "../../flstring.h"
diff --git a/src/drivers/Pico/Fl_Pico_Window_Driver.H b/src/drivers/Pico/Fl_Pico_Window_Driver.H
deleted file mode 100644
index 9601852bb..000000000
--- a/src/drivers/Pico/Fl_Pico_Window_Driver.H
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// Definition of Pico Window interface
-// 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/**
- \file Fl_Pico_Window_Driver.H
- \brief Definition of Pico Window interface.
- */
-
-#ifndef FL_PICO_WINDOW_DRIVER_H
-#define FL_PICO_WINDOW_DRIVER_H
-
-#include "../../Fl_Window_Driver.H"
-
-
-class FL_EXPORT Fl_Pico_Window_Driver : public Fl_Window_Driver
-{
-public:
- Fl_Pico_Window_Driver(Fl_Window *win);
- virtual ~Fl_Pico_Window_Driver();
-
- // --- window data
- virtual int decorated_w();
- virtual int decorated_h();
-};
-
-
-#endif // FL_PICO_WINDOW_DRIVER_H
diff --git a/src/drivers/Pico/Fl_Pico_Window_Driver.cxx b/src/drivers/Pico/Fl_Pico_Window_Driver.cxx
deleted file mode 100644
index 7e8954c29..000000000
--- a/src/drivers/Pico/Fl_Pico_Window_Driver.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// Definition of SDL Window interface based on Pico
-//
-// Copyright 1998-2018 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:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-
-#include <config.h>
-#include "Fl_Pico_Window_Driver.H"
-
-#include <FL/platform.H>
-#include <FL/Fl_Window.H>
-#include <FL/fl_draw.H>
-
-
-Fl_Pico_Window_Driver::Fl_Pico_Window_Driver(Fl_Window *win)
-: Fl_Window_Driver(win)
-{
-}
-
-
-Fl_Pico_Window_Driver::~Fl_Pico_Window_Driver()
-{
-}
-
-
-int Fl_Pico_Window_Driver::decorated_w()
-{
- return w();
-}
-
-
-int Fl_Pico_Window_Driver::decorated_h()
-{
- return h();
-}