summaryrefslogtreecommitdiff
path: root/src/drivers/Cocoa
AgeCommit message (Collapse)Author
2022-11-07Create class Fl_Unix_Screen_Driver used by X11 and Wayland platformsManoloFLTK
2022-10-02Clean use of virtual GLContext Fl_Gl_Window_Driver::create_gl_context().ManoloFLTK
2022-10-02macOS: simpler way to delete the GL1 context of widgets-using GL3 windows.ManoloFLTK
2022-10-01macOS: fixed problem in resizing of widget-containing OpenGL 3 window.ManoloFLTK
2022-09-30macOS: simpler code for auxiliary NSView supporting widgets on a GL3 window.ManoloFLTK
2022-09-29macOS platform: rename Fl_Cocoa_Gl_Window_Driver.cxx to .mmManoloFLTK
2022-09-29Support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes in widget-containing GL3 windows. Demo program examples/OpenGL3test is modified to show FLTK widgets even if the platform does not support OpenGL 3.
2022-09-28macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This code is OK under macOS 10 9 and 13.
2022-09-27Simpler code to support FLTK widgets in macOS OpenGL 3 windows.ManoloFLTK
Also, the application-level code to add widgets to a GL3 window becomes platform-independent.
2022-09-25Add cross-platform support for adding widgets to an OpenGL3-based Fl_Gl_Window.ManoloFLTK
Under non-macOS platforms, the key is to call glUseProgram(0); after having used OpenGL 3 which allows to then use OpenGL 1 and draw FLTK widgets over the OpenGL3 scene. Under macOS, this is impossible because macOS GL3 contexts are not compatible with GL1. The solution implemented here is to create an additional Fl_Gl_Window placed above and sized as the GL3-based window, to give it a non opaque, GL1-based context, and to put the FLTK widgets in that additional window.
2022-09-14Improve virtual void* Fl_Gl_Window_Driver::GetProcAddress(procName)ManoloFLTK
2022-09-13Remove forgotten debug code.ManoloFLTK
2022-09-07Improve support of child windows that may leak outside their parent window.ManoloFLTK
1) add Wayland code that prevent subwindows from leaking outside their parent. This does not cover GL subwindows. 2) add macOS code that prevent GL subwindows from leaking outside their parent. This fixes issue #494 for the macOS platform. N.B.: Wayland GL subwindows are not prevented from leaking because no solution that would not require any change in client applications was found. Code that would cover Wayland GL subwindows but would require client applications to always use the FL_ALPHA flag is included in this commit in commented out form.
2022-09-01Simplify Fl_Window_Driver::screen_num() member functions.ManoloFLTK
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2022-08-20Remove FL_EXPORT qualifier from platform-specific class declarations.ManoloFLTK
2022-07-30Add support of macOS Ventura 13.0ManoloFLTK
2022-06-19Move input method support to Fl_Screen_Driver from Fl_Graphics_DriverManoloFLTK
2022-05-07Change protection levels in classes Fl_XXX_Gl_Window_DriverManoloFLTK
2022-05-06Remove useless typedef declaration.ManoloFLTK
2022-05-05Move struct shape_data_type inside Fl_XXX_Window_Driver.ManoloFLTK
2022-03-31Fix whitespace errors (no code changes)Albrecht Schlosser
2022-03-21Issue #359 RFE: access the MacOS windowid .ManoloFLTK
2022-03-13Remove unnecessary #include directivesManoloFLTK
2022-03-13Separate platform init functions from platform-specific driver filesManoloFLTK
2022-02-03Reorganize classes Fl_System_Driver and Fl_Screen_DriverManoloFLTK
These virtual members are moved from Fl_Screen_Driver to Fl_System_Driver - wait(double) - ready() These virtual members are moved from Fl_System_Driver to Fl_Screen_Driver - copy(const char *stuff, int len, int clipboard, const char *type) - void paste(Fl_Widget &widget, int clipboard, const char *type) - clipboard_contains(const char *type) - clipboard_notify_change() These members are moved from Fl_X11_Screen_Driver to Fl_X11_System_Driver - poll_or_select_with_delay(double time_to_wait) - poll_or_select() and are made virtual in preparation for the introduction of class Fl_Unix_System_Driver.
2022-01-31Consolidate timeout handling across platforms (#379)Albrecht Schlosser
Add Fl_Timeout class Move platform independent code of Fl::wait() to main part - basic timeout handling - Fl::run_checks() - Fl::run_idle() - Fl::idle() - waiting time calculation (next timeout) - remove platform dependent "screen driver" stuff
2022-01-16Rename FL/fl_string.h to FL/fl_string_functions.hAlbrecht Schlosser
This is part 1 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-07Re-organize cross-platform support for text input methods.ManoloFLTK
FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms (X11, Windows, macOS). This support has an interface with FLTK that is common for X11 and Windows, via (undocumented) functions fl_set_spot(), fl_set_status() and fl_reset_spot(). In contrast, and because it's been developed independently, the interface between the macOS TIM and FLTK 1.3 is completely different : static functions FL::insertion_point_location() and Fl::reset_marked_text(). The present change implements a single TIM/FLTK interface used by all platforms based on functions fl_set_spot() and fl_reset_spot(). The previous macOS-specific functions FL::insertion_point_location() and Fl::reset_marked_text() are maintained only for compatibility with 1.3 and deprecated.
2021-12-09Remove compiler warnings about unused parameters (issue #307) - cont'dManoloFLTK
2021-12-07Fix for fltk.coredev "reentrant calls with Fl_Window::resize" - cont'dManoloFLTK
2021-12-06macOS platform: compute the screen number where a top window is mapped.ManoloFLTK
2021-11-24Fix for [fltk.coredev] reentrant calls with Fl_Window::resizeManoloFLTK
2021-07-24Remove useless friend declaration.ManoloFLTK
2021-07-08macOS: Fl::add_timeout() must always create a new timer (#248)Albrecht Schlosser
The old version would reschedule an existing timer if a matching timer existed already which was unique to macOS. The new behavior is consistent on all platforms and allows to create multiple timer entries with the same callback and userdata.
2021-07-07macOS: Fix a timer inconsistency and prevent a crashAlbrecht Schlosser
Calling Fl::repeat_timeout() instead of Fl::add_timeout() to create a timer would crash on macOS but fall back to Fl::add_timeout() on Windows and Unix/Linux. Although this is documented as "undefined behavior" a crash should always be avoided and the fallback is now consistent on all major platforms. In the future this may be documented as the standard behavior.
2021-06-18Revert parts of and fix other 'constness' changes (#239, #181)Albrecht Schlosser
Some of the previous constness changes turned out to be incomplete, others had to be reverted because some other driver methods could not be made 'const' - particularly those calling open_display() to get the requested information.
2021-04-27Slightly simplify gl_texture_fifo::compute_texture()ManoloFLTK
The font size is set to the value necessary for the GL scene before computing the string width. Virtual Fl_Gl_Window_Driver::effective_size() becomes unnecessary.
2021-02-19Remove use of static global var gl_fontsize inside virtual member ↵ManoloFLTK
Fl_Gl_Window_Driver::alpha_mask_for_string()
2021-02-16Use <config.h> when appropriate.ManoloFLTK
2021-02-16Create virtual Fl_RGB_Image* Fl_Gl_Window_Driver::capture_gl_rectangle()ManoloFLTK
2021-02-16Create classes Fl_XXX_Gl_Window_Driver according to driver model.ManoloFLTK
2020-11-02Fix possible memory leak in ↵ManoloFLTK
Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled() Thanks to "fire-eggs" for spotting it. Also minor optimisations in Fl_X11_Screen_Driver::read_win_rectangle_unscaled() and Fl_Cocoa_Screen_Driver::read_win_rectangle_unscaled(). This closes PR #151.
2020-10-12Simpler macOS implementation of capture of window titlebars.ManoloFLTK
2020-10-11Change procedure to capture window titlebar for macOS ≥ 10.15ManoloFLTK
That is necessary to support macOS Big Sur because previous procedure did not work for tabbed windows. The new procedure is potentially usable from macOS 10.5, but tested at this stage for macOS ≥ 10.15.
2020-09-21macOS: minor improvement of capture of window titlebar.ManoloFLTK
2020-09-19macOS: increase resolution when drawing window titlebars to PostScriptManoloFLTK
2020-08-01Implement + deploy fl_strdup()Greg Ercolano
2020-07-30Fix use of an SVG image in Fl_Tiled_Image when display is rescaled.ManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.