summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
AgeCommit message (Collapse)Author
2015-09-22Make sure the FLTK and the system keep their representations of window ↵Manolo Gouy
coordinates synchronized. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10Mac OS: slightly simpler code that does just the same thing.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10861 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10Mac OS: 1) simpler tracking of window changes between retina/non retina ↵Manolo Gouy
displays. 2) improved window creation in iconized state (child windows still don't show in icon, though). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07Mac OS: added missing cast required by some compilers.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10856 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07Mac OS: properly handle OpenGL profile requests independently from what SDK ↵Manolo Gouy
version is used at compile time. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Removed the global variable inputContext_SEL.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Programs compiled with pre-10.7 SDKs can now fully use retina displays.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Improved handling of differences between OS versions in text input.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-25It's clearer to implement and use a doNothing: message.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-24Remove a compilation warning appearing with Mac OS 10.11 +Manolo Gouy
explain better the intent of this thread creation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-17Mac OS: simpler algorithm for function NSBitmapImageRep* GL_rect_to_nsbitmap()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-16Mac OS: more efficient handling of ARGB image data produced underManolo Gouy
Mac OS 10.11 when capturing screen data. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-11Improved Mac OS implementation of Fl_Window::wait_for_expose().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-07- Implement Fl_Window::wait_for_expose() for Mac OS:Manolo Gouy
The -[NSWindow makeKeyAndOrderFront:] message used to make the window appear on the screen, but, starting with 10.10 (approximately), this changed, and it became necessary to query for events for a new window to appear on the screen. With 10.11 two event messages are needed. The solution is therefore to implement Fl_Window::wait_for_expose(). - Calling NSDisableScreenUpdates()()/NSEnableScreenUpdates() before and after window updates greatly accelerates multi-window update operations. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-01Simpler code to support copy/paste of image data, that is also valid from ↵Manolo Gouy
Mac OS 10.3. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-25Fixed image copy/paste for Mac OS 10.4 and 10.5 that use different ↵Manolo Gouy
pasteboard type names from later OS versions. Unfortunately, it does not work with Mac OS 10.3 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-25Make Fl_Copy_Surface work on Mac OS 10.3:Manolo Gouy
use different pasteboard data type names according to running OS. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-24Use -(NSGraphicsContext*)[NSWindow graphicsContext] to obtain the adequateManolo Gouy
graphics context to draw to a window. This requires Mac OS 10.4. The advantage is that it is possible for a secondary thread to call Fl_Window::make_current() without needing to create an autorelease pool. We save the native graphics state, and also the state with origin at top. Fl_X::q_release_context() restores the graphics state twice to return to the native state. This allows to use a single graphics context for a single window and a single thread. Under 10.3, we have to create a new NSGraphicsContext when Fl_Window::make_current() is called directly, so that secondary threads cannot call Fl_Window::make_current() without having created an autorelease pool. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-24Restore usability on Mac OS 10.3: Manolo Gouy
- do not use NSOpenGLPFAMultisample - do not use -[NSBitmapImageRep bitmapFormat] that require Mac OS 10.4 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-20Prepare for Mac OS 10.11 'El Capitan':Manolo Gouy
- avoid double redraw after window deminiaturization - make sure that a new window appears on screen during the Fl_X::make() call git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-19Make sure the window is drawn when Fl_X::make() is calledManolo Gouy
(necessary with Mac OS 10.11). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18Restore compilability with Mac OS SDK 10.3 and aboveManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17Allow compilation with early Mac OS SDKsManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10796 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17Comment for a change that appeared in Mac OS 10.11Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-15Preparing for Mac OS 10.11 'El Capitan':Manolo Gouy
change in rect_to_NSBitmapImageRep(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-13Prepare for Mac OS 10.11 "El Capitan"Manolo Gouy
Screen captures produce ARGB data (instead of RGBA until 10.10) so access to the raw image data takes now this into account. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-11Improved Fl_Window::make_current() that now creates a new NSGraphicsContext ↵Manolo Gouy
only when drawing is not done through the standard event loop. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-30Define NSInteger in FL/mac.H when needed, so it's available to all source files.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-28Directly draw windows without forcing the system to send the -[NSView ↵Manolo Gouy
drawRect:] message because this slowed window drawing under Mac OS 10.10 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-12Mac OS: computing a method's address once is enough.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-18Add support for Fl::copy(..clipboard = 2..)Lauri Kasanen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-29Removed unneeded include statements.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10728 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-29Simpler writing of Fl_X::get_carbon_function().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-28Restored the possibility to call Fl::set_font()Manolo Gouy
in a global initializer (before main() starts). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-20We cannot resize the selection buffer without also storing the newPierre Ossman
length or we may get buffer overflows the next time we copy something. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10709 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-03Restore compilability with old SDKs after commit of support for zoom gesture.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-01Added FL_ZOOM_GESTURE gesture for OS X.Matthias Melcher
Sadly, I have not commited any code in years, and despite the rumour that I was hit by a train, or worse, move on to Qt, here I am, commmiting unwanted code. Hopefully there are equivalents for this on other platforms?! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10656 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-18Mac OS: Fixed issue where the system object supporting a window created ↵Manolo Gouy
before the event loop started could not be deallocated. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-15It is preferable to use a complete initializer for a class instance.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10579 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-13Mac OS: fixed order of preference of data type when pasting graphical data.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10578 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-13Mac OS: more accurate way to determine the screen where the paste operation ↵Manolo Gouy
occurs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10574 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-11Fixed change made at r.10560 that breaks compilation with old SDKsManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10572 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-09Mac OS: correct window redraws after a window was created in iconized form.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10564 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-08Allow compilation with -std=c++11 on Mac OS XManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-02Replace gl_xxx() function names by new member functions of the Fl_X class to ↵Manolo Gouy
avoid collisions with user-defined symbols. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-31Improved Mac OS X Fl_Gl_Window resizing: the GL scene was drawn twice at ↵Manolo Gouy
each resize operation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-28Stop using dynamic_cast when performing text drag (Mac OS only).Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-24Restore compilability with Mac OS X SDK 10.4uManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10534 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-24Simpler coding of the half-pixel offset necessary when clipping to a rectangle.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10533 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-23It is necessary to call fl_cgrectmake_cocoa() when building the clipping ↵Manolo Gouy
rectangle for a sub-window, as for any clipping rectangle. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10532 ea41ed52-d2ee-0310-a9c1-e6b18d33e121