Manolo Gouy
7c0c17a452
Preparing for Mac OS 10.11 'El Capitan':
...
change in rect_to_NSBitmapImageRep().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-15 21:47:39 +00:00
Manolo Gouy
3283aacf98
Prepare for Mac OS 10.11 "El Capitan"
...
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-13 20:43:13 +00:00
Manolo Gouy
9e320937fc
Improved Fl_Window::make_current() that now creates a new NSGraphicsContext 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-07-11 15:35:20 +00:00
Manolo Gouy
634ede015d
Define NSInteger in FL/mac.H when needed, so it's available to all source files.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-30 02:23:26 +00:00
Manolo Gouy
a6b88e9191
Directly draw windows without forcing the system to send the -[NSView 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-28 19:28:23 +00:00
Manolo Gouy
a097978096
Mac OS: computing a method's address once is enough.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-12 13:15:38 +00:00
Lauri Kasanen
03f69c0dd5
Add support for Fl::copy(..clipboard = 2..)
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-18 09:10:06 +00:00
Manolo Gouy
626b8ef596
Removed unneeded include statements.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10728 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-29 11:48:26 +00:00
Manolo Gouy
a94642ee30
Simpler writing of Fl_X::get_carbon_function().
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-29 11:33:56 +00:00
Manolo Gouy
f9fa74e3af
Restored the possibility to call Fl::set_font()
...
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-28 22:02:48 +00:00
Pierre Ossman
07c9526085
We cannot resize the selection buffer without also storing the new
...
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-20 11:57:41 +00:00
Manolo Gouy
38a0ebd38f
Restore compilability with old SDKs after commit of support for zoom gesture.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-03 05:31:01 +00:00
Matthias Melcher
d44b518c07
Added FL_ZOOM_GESTURE gesture for OS X.
...
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-04-01 15:32:06 +00:00
Manolo Gouy
93372a77c1
Mac OS: Fixed issue where the system object supporting a window created 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-18 06:20:57 +00:00
Manolo Gouy
a5fcc0a91f
It is preferable to use a complete initializer for a class instance.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10579 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-15 09:07:00 +00:00
Manolo Gouy
0cc3a5247a
Mac OS: fixed order of preference of data type when pasting graphical data.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10578 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-13 14:18:12 +00:00
Manolo Gouy
2633a887b7
Mac OS: more accurate way to determine the screen where the paste operation occurs.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10574 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-13 07:41:59 +00:00
Manolo Gouy
eb82b2fb9a
Fixed change made at r.10560 that breaks compilation with old SDKs
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10572 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-11 10:09:44 +00:00
Manolo Gouy
522fc17d31
Mac OS: correct window redraws after a window was created in iconized form.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10564 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-09 12:56:06 +00:00
Manolo Gouy
1dd0cdcee9
Allow compilation with -std=c++11 on Mac OS X
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-08 06:48:19 +00:00
Manolo Gouy
5017171db8
Replace gl_xxx() function names by new member functions of the Fl_X class to avoid
...
collisions with user-defined symbols.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-02 13:08:51 +00:00
Manolo Gouy
8887600f5f
Improved Mac OS X Fl_Gl_Window resizing: the GL scene was drawn twice at each resize operation.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-31 15:08:31 +00:00
Manolo Gouy
64ffd414d6
Stop using dynamic_cast when performing text drag (Mac OS only).
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-28 17:05:29 +00:00
Manolo Gouy
00f66de2cd
Restore compilability with Mac OS X SDK 10.4u
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10534 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-24 17:37:58 +00:00
Manolo Gouy
ed547c6c63
Simpler coding of the half-pixel offset necessary when clipping to a rectangle.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10533 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-24 12:54:21 +00:00
Manolo Gouy
6f022c4d95
It is necessary to call fl_cgrectmake_cocoa() when building the clipping 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
2015-01-23 10:14:09 +00:00
Manolo Gouy
2d264fa8d5
A few comment changes.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10531 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-22 17:45:09 +00:00
Manolo Gouy
1b00cc8e21
Make sure subwindows don't leak out of their parent windows.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10530 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-22 12:32:11 +00:00
Manolo Gouy
bbd7d9cb59
Have Fl_Paged_Device::print_window() print window title bars with rounded angles under Yosemite also.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-21 12:09:50 +00:00
Manolo Gouy
eb33a418d5
Avoid potential crash if Fl::focus() returns NULL.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10527 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-19 14:41:32 +00:00
Manolo Gouy
c9782669c0
Ignore text input methods when the focus is to an Fl_Gl_Window.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10523 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-19 12:27:37 +00:00
Manolo Gouy
365c1524c0
Fix possible crash when calling Fl_Window::resize() on a non-mapped sub-window.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-16 10:28:36 +00:00
Manolo Gouy
7ad5091dbc
Corrected one comment and added one.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10521 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-16 07:24:11 +00:00
Manolo Gouy
af42e3cd5f
Fixed Fl_Window::resize() on Mac OS because program-generated resize did not work
...
with new true subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-15 21:57:27 +00:00
Manolo Gouy
790fc0ce02
Some indentation cleaning.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10519 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-14 15:10:16 +00:00
Manolo Gouy
ae9ea6b51f
When CGBitmapContextCreate() is used with null 5th argument, it is necessary
...
to use CGBitmapContextGetBytesPerRow().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10518 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-14 14:21:01 +00:00
Manolo Gouy
bc8a7037eb
Avoid compilation warnings appearing with SDK 10.5
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10517 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-14 13:29:05 +00:00
Manolo Gouy
56fd2fc9f9
Fl_Paged_Device::print_window() now uses the CALayer class to print in one step
...
all of the window title bar, when the program is linked with OS X 10.10.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10515 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-13 16:36:04 +00:00
Manolo Gouy
335212dacb
Better implementation of Fl_Paged_Device::print_window() for Mac OS X Yosemite:
...
title bar buttons are drawn by the system instead of emulated by FLTK.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10510 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-09 17:28:19 +00:00
Manolo Gouy
7f7e84b696
Simplified Fl_X::flush() for GL windows.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10507 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-04 14:41:50 +00:00
Ian MacArthur
b2462e9adb
Fix typo in Fl_cocoa.mm if the ABI was set to 10304 or greater.
...
Seems ot be compiling OK again now.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10505 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-21 18:03:03 +00:00
Manolo Gouy
f3a84c0ee5
Changed OpenGL support for the Mac OS X platform: use cocoa instead of 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-20 07:19:23 +00:00
Manolo Gouy
ea279f9354
Avoid double window redraw after deminiaturization.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10495 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 04:53:01 +00:00
Manolo Gouy
f2cba934cb
Restores compilation with SDK’s before 10.7, erroneously broken in a recent commit.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10490 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 17:32:08 +00:00
Manolo Gouy
d8ddb7b511
Removed compilation warning for unused variable.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 08:27:28 +00:00
Manolo Gouy
15d497ebdf
Apple-only changes to restore a layout of the Fl_X class identical to that 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-12-17 09:04:01 +00:00
Manolo Gouy
00dd28afa4
Completed support of retina displays for Fl_Paged_Device::print_window_part().
...
Case with high resolution parent window and low resolution GL window is now directly processed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-12 17:12:11 +00:00
Manolo Gouy
e230a34cfd
It is necessary to compute Fl_X::mapped_to_retina after the window is mapped
...
because the windowDidMove notification is not always sent.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 22:25:31 +00:00
Manolo Gouy
bf07d892a3
Fix case when show() of a subwindow whose parent is not shown yet.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 20:34:47 +00:00
Manolo Gouy
879a8fbabf
Propagate Fl_X::mapped_to_retina value from parent to subwindows.
...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 20:09:55 +00:00