From 6e9f72adce1e0371d8a8e9487a5b28e30daf4561 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 7 Nov 2022 06:54:09 +0100 Subject: [PATCH] Delete src/drivers/X11/Fl_X11_System_Driver.* --- src/drivers/X11/Fl_X11_System_Driver.H | 43 -------- src/drivers/X11/Fl_X11_System_Driver.cxx | 127 ----------------------- 2 files changed, 170 deletions(-) delete mode 100644 src/drivers/X11/Fl_X11_System_Driver.H delete mode 100644 src/drivers/X11/Fl_X11_System_Driver.cxx diff --git a/src/drivers/X11/Fl_X11_System_Driver.H b/src/drivers/X11/Fl_X11_System_Driver.H deleted file mode 100644 index 6e94bf44b..000000000 --- a/src/drivers/X11/Fl_X11_System_Driver.H +++ /dev/null @@ -1,43 +0,0 @@ -// -// Definition of Posix system driver -// for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2022 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_X11_SYSTEM_DRIVER_H -#define FL_X11_SYSTEM_DRIVER_H - -#include -#include "../Unix/Fl_Unix_System_Driver.H" - -class Fl_X11_System_Driver : public Fl_Unix_System_Driver { -public: - Fl_X11_System_Driver() : Fl_Unix_System_Driver() { - // X11 system driver does not use a key table - key_table = NULL; - key_table_size = 0; - } - virtual int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*); - // these 2 are in Fl_get_key.cxx - virtual int event_key(int k); - virtual int get_key(int k); - virtual int need_menu_handle_part1_extra() {return 1;} - virtual const char *shortcut_add_key_name(unsigned key, char *p, char *buf, const char **); - virtual void own_colormap(); - // 2 additional virtual members - virtual int poll_or_select(); - virtual int poll_or_select_with_delay(double time_to_wait); -}; - -#endif /* FL_X11_SYSTEM_DRIVER_H */ diff --git a/src/drivers/X11/Fl_X11_System_Driver.cxx b/src/drivers/X11/Fl_X11_System_Driver.cxx deleted file mode 100644 index 4eebee27a..000000000 --- a/src/drivers/X11/Fl_X11_System_Driver.cxx +++ /dev/null @@ -1,127 +0,0 @@ -// -// Definition of Posix system driver -// for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2022 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_X11_System_Driver.H" -#include -#include // fl_strdup -#include -#include "../../flstring.h" -#include "../../Fl_Timeout.h" - -#include -#include -#include -#include -#include -#include -#include // strerror(errno) -#include // errno -#if HAVE_DLSYM && HAVE_DLFCN_H -#include // for dlsym -#endif - - -#if defined(_AIX) -extern "C" { -# include -# include - // Older AIX versions don't expose this prototype - int mntctl(int, int, char *); -} -#endif // _AIX - -#if defined(__NetBSD__) -extern "C" { -# include // For '__NetBSD_Version__' definition -# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 300000000) -# include -# include -# if defined(HAVE_PTHREAD) && defined(HAVE_PTHREAD_H) -# include -# endif // HAVE_PTHREAD && HAVE_PTHREAD_H -# ifdef HAVE_PTHREAD - static pthread_mutex_t getvfsstat_mutex = PTHREAD_MUTEX_INITIALIZER; -# endif // HAVE_PTHREAD/ -# endif // __NetBSD_Version__ -} -#endif // __NetBSD__ - -#ifndef HAVE_SCANDIR -extern "C" { - int fl_scandir(const char *dirname, struct dirent ***namelist, - int (*select)(struct dirent *), - int (*compar)(struct dirent **, struct dirent **), - char *errmsg, int errmsg_sz); -} -#endif - - -int Fl_X11_System_Driver::XParseGeometry(const char* string, int* x, int* y, - unsigned int* width, unsigned int* height) { - return ::XParseGeometry(string, x, y, width, height); -} - - -#if !defined(FL_DOXYGEN) - -const char *Fl_X11_System_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom) -{ - const char* q; - if (key == FL_Enter || key == '\r') q = "Enter"; // don't use Xlib's "Return": - else if (key > 32 && key < 0x100) q = 0; - else q = XKeysymToString(key); - if (!q) { - p += fl_utf8encode(fl_toupper(key), p); - *p = 0; - return buf; - } - if (p > buf) { - strcpy(p,q); - return buf; - } else { - if (eom) *eom = q; - return q; - } -} - -void Fl_X11_System_Driver::own_colormap() { - fl_open_display(); -#if USE_COLORMAP - switch (fl_visual->c_class) { - case GrayScale : - case PseudoColor : - case DirectColor : - break; - default: - return; // don't do anything for non-colormapped visuals - } - int i; - XColor colors[16]; - // Get the first 16 colors from the default colormap... - for (i = 0; i < 16; i ++) colors[i].pixel = i; - XQueryColors(fl_display, fl_colormap, colors, 16); - // Create a new colormap... - fl_colormap = XCreateColormap(fl_display, - RootWindow(fl_display,fl_screen), - fl_visual->visual, AllocNone); - // Copy those first 16 colors to our own colormap: - for (i = 0; i < 16; i ++) - XAllocColor(fl_display, fl_colormap, colors + i); -#endif // USE_COLORMAP -} - -#endif // !defined(FL_DOXYGEN)