summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
AgeCommit message (Collapse)Author
2016-02-11Mark places that need to be refactored with // PORTME:Matthias Melcher
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11Move platform part of Fl::flush()Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10Basic Screen Driver Structure. LIMBO!Matthias Melcher
Creating the basic structure for a screen driver system. OS X works X11 and WinAPI are in limbo and will be fixed in the next hour or so. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-271) Added a new way to detect whether the drawing operation is using the ↵Manolo Gouy
platform's native driver and whether we are printing: virtual int Fl_Graphics_Driver::has_feature(driver_feature feature) This is also because it is not convenient to derive a printer-specific driver with its own implementation of virtual functions when this implementation differs only in one line of code. 2) Solved the problem of inclusion of non public header by the public header FL/Fl_Device.H: bracket this with #if FL_LIBRARY / #endif so this non public header is included only when building FLTK itself. 3) Removed several (but not all) of the FLTK_ABI_VERSION guards that are no longer useful for code targeting FLTK 1.4. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-18Fixed stupid typo in variable nameMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11007 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-17Trying to create a more detaild way to configure the library, added runtime ↵Matthias Melcher
information, added an OpenGL graphics driver that renders a button on top of an OpenGL window (see test/cube). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04Created pseudo code for all FL_PORTED section so that FLTK compiles and ↵Matthias Melcher
links (Xcode, hello, other C flags: -D FL_PORTING -U __APPLE__ -U __APPLE_QUARTZ__) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04Fix typos in #pragma FL_PORTING.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03Updated platform specific #if's to report unimplemented code when compiling ↵Matthias Melcher
with FL_PORTING defined and WIN32 and __APPLE__ undefined> git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02Mac OS: support for high resolution OpenGL windows.Manolo Gouy
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941 are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added. The documentation explains in more detail how to write cross-platform FLTK code supporting high resolution OpenGL windows on retina displays. The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the ↵Manolo Gouy
mouse event position in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display. On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y(). The example/OpenGL3test demo program is modified to call these new functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16Fixed typo in Doxygen doc.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-27Prevent sending (FL_SHORTCUT) events to inactive widgets (STR #3216).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-16Fl::delete_widget() was changed in 1.3.4 to immediately hide the widget,Manolo Gouy
but the case of an iconified window (visible() is false and shown() is true) was forgotten. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10730 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-19Rename static int send(..) to send_event() in src/Fl.cxx.Albrecht Schlosser
Also: remove unnecessary '#include <stdio.h>' (needed only for debugging). Rationale: search for 'send' within the file has too many false positive hits. The function is 'static' and hence local to this file. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-13Fix for STR#3165, as solved by OP.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10697 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-04Add FL_ABI_VERSION, FL_API_VERSION, Fl::abi_version(), and Fl::api_version().Albrecht Schlosser
The new constants are the API and ABI versions in int format, resp. The new static methods return the compiled-in API and ABI versions, resp. FLTK_ABI_VERSION is deprecated, but still defined (same as FL_ABI_VERSION). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10673 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20Changed OpenGL support for the Mac OS X platform: use cocoa instead of ↵Manolo Gouy
deprecated AGL. All changes are mac-specific, except a very minor change in file src/gl_draw.cxx where string drawing wrongly claimed to support @symbol, not possible because symbols are drawn using non-GL primitives. Unchanged application code can use the new FLTK code. In addition, the new code allows mac applications to draw OpenGL scenes at high resolution on so-called 'retina' displays, but this requires some support from app code. They must call, before opening GL windows, Fl::use_high_resolution(1); and change their glViewport() calls as follows glViewport(0, 0, pxel_w(), pixel_h()); This uses 2 new member functions of the Fl_Gl_Window class, pixel_w() and pixel_h() returning the window dimensions in pixel units, that is, twice the w() and h() when the window is mapped on a retina display. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-17Apple-only changes to restore a layout of the Fl_X class identical to that ↵Manolo Gouy
in FLTK 1.3.3. With true subwindows, several members of Fl_X became useless. This change recycle two of them for new uses: - Fl_Region subRegion is used as a pointer to a CGRect - Fl_X *xidChildren is used to indicate the resolution of the display containing a window git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-15Fl::delete_widget() now hides a widget/window if it is shown (visible_r()).Albrecht Schlosser
This is useful (necessary) because in old (pre 1.1.6) which didn't have Fl::delete_widget() users would have called 'delete window', which would have hidden a window and destroyed it as well. Now the widget/window is hidden immediately, whereas it is destroyed delayed, which comes much closer to the previous behavior and is useful for better window close detection in Mac OS X cmd-Q handling. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10456 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-11Added support of true subwindows to the Mac OS X code. With this, a window ↵Manolo Gouy
inside another window is just another window with Mac OS as it was already with MSWindows and X11. This requires Mac OS X 10.2. Window nesting to any depth is possible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-08Make the retargeting of the Windows clipboard notificationPierre Ossman
more explicit. Otherwise we could end up with Fl::remove_clipboard_notify() unregistering, just to have it immediately re-register again. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-21STR#3093 continued: deleted the Fl_Shaped_Window class. Instead, added new ↵Manolo Gouy
member function Fl_Window::shape(Fl_Image*) that gives a non-rectangular shape to a standard window. The benefit is that it works with Fl_Double_Window and Fl_Menu_Window as well. It also works for free with Fl_Gl_Window on the X11 platform only. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-15Consolidate the Win32 init and cleanup code in to one place soPierre Ossman
it's easier to keep track of it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-15Add methods to intercept low level system events.Pierre Ossman
This gives applications the means to handle some low level integration with the system that might otherwise not be possible without modifying FLTK itself. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-05Move the ewmh_supported check into fl_fix_focus to avoid a double show() on ↵Lauri Kasanen
new WMs git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-05Robustness fix for the first windowLauri Kasanen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-05Fix cross-window focus throwing on X11, similar to the Mac case. STR #3129Lauri Kasanen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16Add ability to set custom icons for windows. STR #2816.Pierre Ossman
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-07STR #3088: make Fl_Native_File_Chooser use the standard GTK file dialog when ↵Manolo Gouy
available. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10186 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-23Added copy/paste from/to FLTK applications of graphical data.Manolo Gouy
Added Fl_Image_Surface class to draw into an Fl_Image object. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-04Fix for STR#3079 (cont'd).Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-03Fix for STR#3079 (WIN32 only).Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-07Fix crash when Fl_Window::flush() is called before show() (STR #3028).Albrecht Schlosser
The fix is twofold: (1) if Fl_Window::flush() is called, this is ignored silently (2) if Fl_Window::make_current() is called directly, but the window is currently not shown(), then the program will be terminated with an error message. The latter is necessary because returning from make_current() would leave the program in a state where it would expect to have a valid drawing context. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-18Mac OS: put idle processing under an alloc/release pair of an NSAutoreleasePool.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-11STR 2636. Add ability to get notifications whenever thePierre Ossman
clipboard changes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-11Simplify clipboard handling on Windows by consolidatingPierre Ossman
it into one central function. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-06Small comment mods regarding Fl_mac.cxx -> Fl_cocoa.mmGreg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-17Added examples for Fl::option() methodsGreg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-02Mac OS text input: a single FL_KEYBOARD event is now sent when processing ↵Manolo Gouy
dead keys. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-28Fix STR#2928: alt+e on US keyboard not processed correctly as shortcut on ↵Manolo Gouy
Mac OS. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-25Mac OS: added support for internationalization of the application menu.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-08-16STR 2730: avoid putting widgets into the delete list twiceMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23Fix STR#2641: true fullscreen windows that cover all their screen including ↵Manolo Gouy
menu bar, task bar, dock. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04STR#2600 again: more detailed Doxygen comments of the ↵Manolo Gouy
FL_SCREEN_CONFIGURATION_CHANGED event. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30Fix STR#2600 : screens configuration changes are now detected under all ↵Manolo Gouy
platforms. Requires the RandR X extension. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30Fix STR#2600 for the MSWindow and Mac OS platforms.Manolo Gouy
A new event FL_SCREEN_CONFIGURATION_CHANGED is introduced. Fl::add_handler() allows to register a callback for this event. The unix/X11 implementation is still missing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23Fix STR #2627: if an X11 window is externally destroyed, FLTK now reacts ↵Manolo Gouy
coherently either deleting the corresponding FLTK window, or recreating the X11 window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23Rework the ifdefs for defining the appropriate value of WINVER in our builds.Ian MacArthur
In particular, ensure that if we redefine WINVER we undef it first (if it is already set) and also ensure that it is set before we include windows.h (by any hidden nested path!) in Fl.cxx. Previously, we were hitting issues with WINVER being redefined in some build cases, e.g. with --enable-cairo set on a win32 build. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121