Giter VIP home page Giter VIP logo

fltk-custom's Introduction

README - Fast Light Tool Kit (FLTK) Version 1.4.0

WHAT IS FLTK?

The Fast Light Tool Kit is a cross-platform C++ GUI toolkit for
UNIX®/Linux® (X11 or Wayland), Microsoft® Windows®, and macOS®.
FLTK provides modern GUI functionality without the bloat and
supports 3D graphics via OpenGL® and its built-in GLUT
emulation. It was originally developed by Mr. Bill Spitzak
and is currently maintained by a small group of developers
across the world with a central repository on GitHub.

For more information see README.txt:
https://github.com/fltk/fltk/blob/master/README.txt

Build

fltk-custom's People

Contributors

rageworx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fltk-custom's Issues

Prevent to overflow warning of Fl_Tabs.

Fl_Tabs.cxx: In member function 'void Fl_Tabs::handle_overflow_menu()':
Fl_Tabs.cxx:256:9: warning: 'void* memset(void*, int, size_t)' specified bound b
etween 18446743953450467384 and 18446744073709551560 exceeds maximum object size
 9223372036854775807 [-Wstringop-overflow=]
  256 |   memset(overflow_menu, 0, sizeof(Fl_Menu_Item)*(nc+1));
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fl_Tabs.cxx:256:9: warning: 'void* memset(void*, int, size_t)' specified bound b
etween 18446743953450467384 and 18446744073709551560 exceeds maximum object size
 9223372036854775807 [-Wstringop-overflow=]

Build failure of FL/platform.H, at FL.cxx (line 22)

Build log,

In file included from Fl.cxx:22:
../FL/platform.H:68:8: error: ‘Window’ does not name a type; did you mean ‘Fl_Window’?
   68 | inline Window fl_xid(const Fl_Window* w) { Fl_X *xTemp = Fl_X::flx(w); return xTemp ? (Window)xTemp->xid : 0; }
      |        ^~~~~~
      |        Fl_Window
../FL/platform.H:74:29: warning: ‘fl_find’ initialized and declared ‘extern’
   74 | extern FL_EXPORT Fl_Window* fl_find(Window xid);
      |                             ^~~~~~~
../FL/platform.H:74:37: error: ‘Window’ was not declared in this scope
   74 | extern FL_EXPORT Fl_Window* fl_find(Window xid);
      |                                     ^~~~~~
../FL/platform.H:77:18: error: ‘Window’ does not name a type; did you mean ‘Fl_Window’?
   77 | extern FL_EXPORT Window fl_window;
      |                  ^~~~~~
      |                  Fl_Window
Fl.cxx:702:12: error: redefinition of ‘Fl_Window* fl_find’
  702 | Fl_Window* fl_find(Window xid) {
      |            ^~~~~~~
In file included from Fl.cxx:22:
../FL/platform.H:74:29: note: ‘Fl_Window* fl_find’ previously defined here
   74 | extern FL_EXPORT Fl_Window* fl_find(Window xid);
      |                             ^~~~~~~
Fl.cxx:702:20: error: ‘Window’ was not declared in this scope
  702 | Fl_Window* fl_find(Window xid) {
      |                    ^~~~~~
Fl.cxx:2160:11: error: ‘Window’ does not name a type; did you mean ‘Fl_Window’?
 2160 | FL_EXPORT Window fl_xid_(const Fl_Window *w) {
      |           ^~~~~~
      |           Fl_Window

Transform animation ?

Looking for transform animation when changes Fl_Group to Fl_Group by getting offscreen buffer with some effects.
May requires fast-blurring graphical processor.

switching repository name to fltk-1.4-*

Now testing v1.4.0-dev is silently better than previous 1.3.5-2-ts.
Graphics driver seperated to each different directory.
It's better than making DirectX Draw layer on Windows GDI driver layer.
Plan changing to base 1.4 from 1.3.5.
Previous 1.3.5-2-ts will be moved to new branch, v1.3.5-2-ts, and current new repository name will be renamed to fltk-1.4-rk.

PNG compilation warnings fix.

In MinGW-W64 compilation, these warnings occurs -

pngprefix.h:147:27: warning: 'number_buf' may be used uninitialized [-Wmaybe-uni
nitialized]
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
In file included from png.h:335,
                 from pngpriv.h:386:
pngprefix.h:147:27: note: by argument 1 of type 'png_const_charp' {aka 'const ch
ar *'} to 'fltk_png_format_number' declared here
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
pngconf.h:287:70: note: in definition of macro 'PNG_FUNCTION'
  287 | #  define PNG_FUNCTION(type, name, args, attributes) attributes type nam
e args
      |                                                                      ^~~
~
pngpriv.h:1744:1: note: in expansion of macro 'PNG_INTERNAL_FUNCTION'
 1744 | PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start
,
      | ^~~~~~~~~~~~~~~~~~~~~
pngpriv.h:1744:33: note: in expansion of macro 'png_format_number'
 1744 | PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start
,
      |                                 ^~~~~~~~~~~~~~~~~
png.c:755:12: note: 'number_buf' declared here
  755 |       char number_buf[5]; /* enough for a four-digit year */
      |            ^~~~~~~~~~
pngprefix.h: In function 'fltk_png_convert_to_rfc1123':
pngprefix.h:147:27: warning: 'number_buf' may be used uninitialized [-Wmaybe-uni
nitialized]
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
pngprefix.h:147:27: note: by argument 1 of type 'png_const_charp' {aka 'const ch
ar *'} to 'fltk_png_format_number' declared here
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
pngconf.h:287:70: note: in definition of macro 'PNG_FUNCTION'
  287 | #  define PNG_FUNCTION(type, name, args, attributes) attributes type nam
e args
      |                                                                      ^~~
~
pngpriv.h:1744:1: note: in expansion of macro 'PNG_INTERNAL_FUNCTION'
 1744 | PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start
,
      | ^~~~~~~~~~~~~~~~~~~~~
pngpriv.h:1744:33: note: in expansion of macro 'png_format_number'
 1744 | PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start
,
      |                                 ^~~~~~~~~~~~~~~~~
png.c:755:12: note: 'number_buf' declared here
  755 |       char number_buf[5]; /* enough for a four-digit year */
      |            ^~~~~~~~~~

It should be fixed by using initializing each buffer definitions by = {0};

Fast graphical effector.

  • May need offscreen buffer graphical effector.
  • Designing fast blurring as like glassed of Mac OS X or windows DWM.

Errors of pngerror.c: In function 'fltk_png_warning_parameter_unsigned'

Logs while compile

In file included from pngpriv.h:77,
                 from pngerror.c:19:
pngerror.c: In function 'fltk_png_warning_parameter_unsigned':
pngprefix.h:147:27: warning: 'buffer' may be used uninitialized [-Wmaybe-uniniti
alized]
  147 | #define png_format_number fltk_png_format_number
pngpriv.h:1749:4: note: in expansion of macro 'png_format_number'
 1749 |    png_format_number(buffer, buffer + (sizeof buffer), format, number)
      |    ^~~~~~~~~~~~~~~~~
pngerror.c:259:37: note: in expansion of macro 'PNG_FORMAT_NUMBER'
  259 |    png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, va
lue));
      |                                     ^~~~~~~~~~~~~~~~~
pngprefix.h:147:27: note: by argument 1 of type 'png_const_charp' {aka 'const ch
ar *'} to 'fltk_png_format_number' declared here
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
pngerror.c:133:1: note: in expansion of macro 'png_format_number'
  133 | png_format_number(png_const_charp start, png_charp end, int format,
      | ^~~~~~~~~~~~~~~~~
pngerror.c:258:9: note: 'buffer' declared here
  258 |    char buffer[PNG_NUMBER_BUFFER_SIZE];
      |         ^~~~~~
pngerror.c: In function 'fltk_png_warning_parameter_signed':
pngprefix.h:147:27: warning: 'buffer' may be used uninitialized [-Wmaybe-uniniti
alized]
  147 | #define png_format_number fltk_png_format_number
pngpriv.h:1749:4: note: in expansion of macro 'png_format_number'
 1749 |    png_format_number(buffer, buffer + (sizeof buffer), format, number)
      |    ^~~~~~~~~~~~~~~~~
pngerror.c:275:10: note: in expansion of macro 'PNG_FORMAT_NUMBER'
  275 |    str = PNG_FORMAT_NUMBER(buffer, format, u);
      |          ^~~~~~~~~~~~~~~~~
pngprefix.h:147:27: note: by argument 1 of type 'png_const_charp' {aka 'const ch
ar *'} to 'fltk_png_format_number' declared here
  147 | #define png_format_number fltk_png_format_number
      |                           ^~~~~~~~~~~~~~~~~~~~~~
pngerror.c:133:1: note: in expansion of macro 'png_format_number'
  133 | png_format_number(png_const_charp start, png_charp end, int format,
      | ^~~~~~~~~~~~~~~~~
pngerror.c:268:9: note: 'buffer' declared here
  268 |    char buffer[PNG_NUMBER_BUFFER_SIZE];
      |         ^~~~~~

Compiler : MinGW-W64 gcc version 13.1.0 (Rev7, Built by MSYS2 project)

Supporting Apple Silicon (M1, ARM64)

Now I got new Macbook Air (M1) basic option, hugh.
Most of components are working for now, but PNG looking for wrong architecture.

Linking fluid...
Undefined symbols for architecture arm64:
  "_png_init_filter_functions_neon", referenced from:
      _png_read_filter_row in libfltk_png.a(pngrutil.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command fail

It should be fixed in PNG makefile.

Re-Calculating weights(min&max)

Filters, Mapping, these changes minimum and maximum levels.
For every next sequence to applying or adjusting something, need re-calculating min.&max. value(level).

Compilaton warning at Fl_Shortcut_Button.cxx

Warning occurs as

In file included from Fl_Shortcut_Button.cxx:17:
../FL/Fl_Shortcut_Button.H: In constructor 'Fl_Shortcut_Button::Fl_Shortcut_Butt
on(int, int, int, int, const char*)':
../FL/Fl_Shortcut_Button.H:28:15: warning: 'Fl_Shortcut_Button::shortcut_value'
will be initialized after [-Wreorder]
   28 |   Fl_Shortcut shortcut_value;
      |               ^~~~~~~~~~~~~~
../FL/Fl_Shortcut_Button.H:26:15: warning:   'Fl_Shortcut Fl_Shortcut_Button::de
fault_shortcut_' [-Wreorder]
   26 |   Fl_Shortcut default_shortcut_;
      |               ^~~~~~~~~~~~~~~~~
Fl_Shortcut_Button.cxx:45:1: warning:   when initialized here [-Wreorder]
   45 | Fl_Shortcut_Button::Fl_Shortcut_Button(int X,int Y,int W,int H, const ch
ar* l)
      | ^~~~~~~~~~~~~~~~~~

Is this warning still remians from fltk/fltk ? need to check.

FLTK sub-platform for Direct2D (aka. previous DirectDraw)

FLTK may support DirectDraw Window with DirectX on Windows system.
DirectDraw doesn't need to wait for flush(), draws everything to fastest.
Functions will works with :

ID2D1Factory*           initializeDFactory( HWND parent );
ID2D1DCRenderTarget*    initializeRenderTargetDC( HDC dc );
ID2D1HwndRenderTarget*  initializeRenderTargetHWND();
IDWriteFactory*         initializeWriteFactory();
IWICImagingFactory*     initializeImageFactory();

Supporting OpenGL|ES

Some embedded system requires OpenGL|ES surface to redner something.
Planning window for OpenGL|ES but not able to support overlay.

Upgrading version to 1.3.5

Current version of FLTK occurs blanked window on MacOSX Mojave.
FLTK 1.3.5rc2 solved this problem, and I am now in progress of merging differences.
I will upgrade my FLTK as 1.3.5 soon.

MacOSX Mojave now successfully supported in working system with lastest version of Xcode, godam it.

User defined Fl_Image scaling method

According to this issue, fltk/fltk#742
Windows don't provided any scaling method when high DPI case.

Looks a custom version may have this type of callback,

 The scaling algorithm to use for RGB images.
*/
enum Fl_RGB_Scaling {
  FL_RGB_SCALING_NEAREST = 0, ///< default RGB image scaling algorithm
#ifndef FLTK_EXT_VERSION
  FL_RGB_SCALING_BILINEAR     ///< more accurate, but slower RGB image scaling algorithm
#else
  FL_RGB_SCALING_BILINEAR = 1,
  FL_RGB_SCALING_USER
#endif /// of FLTK_EXT_VERSION    
};

#ifdef FLTK_EXT_VERSION
/** User scaling callback type definition for FL_RGB_SCALING_USER */
typedef void (Fl_Image_UserScale)(Fl_RGB_Image*, int w, int h, Fl_RGB_Image*);
typedef Fl_Image_UserScale* Fl_Image_UserScale_p; // needed for BORLAND
#endif /// of FLTK_EXT_VERSION    

...

#ifndef FLTK_EXT_VERSION
  static void scaling_algorithm(Fl_RGB_Scaling algorithm) {scaling_algorithm_ = algorithm; }
#else 
  static void scaling_algorithm(Fl_RGB_Scaling algorithm, Fl_Image_UserScale* userscale = NULL) 
  {
      scaling_algorithm_ = algorithm;
      user_scaling_ = userscale;
  }
#endif /// of FLTK_EXT_VERSION    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.