2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders()
that contains all the platform-specific code of all operations related to drawing
window borders and title bars. What is platform-specific and what is not
is therefore much clearer, to ease porting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
to build an X11-using version of FLTK on the Mac OS platform.
This matches the recent support of the --enable-x11 option
by the configure script on the mac.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10986 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit makes the file config.h generated by CMake 100% compatible
with the one generated by autoconf/configure.
Fixes in this commit:
- Set FLTK_DATADIR and FLTK_DOCDIR with the same default values.
Note: needs some cleanup, option values are not clear, '/fltk'
is currently appended in export.cmake (needs improvement).
- Simulation of autoconf macro AC_HEADER_DIRENT for correct
definition of only one 'dirent' header file.
- Fix more function checks:
- dlsym
- png_get_valid
- png_set_tRNS_to_alpha
- Improve "Big Endian" check for __APPLE__ (mac_endianness.h).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The files "config.h" generated by configure and CMake are now almost
identical, except a few comments and some still missing or failing
config tests, for instance checks for some functions in libraries.
[Note: tested and compared on Linux.]
configh.cmake.in: Fixed many #cmakedefine and #cmakedefine01 statements
so they #define their variables as 0 or 1, or /* #undef */ it, resp.,
as it is done in the configure build.
Added tests:
- libXrender
Fixed tests:
- function glXGetProcAddressARB
Todo (still failing tests in CMake):
- HAVE_PNG_GET_VALID
- HAVE_PNG_SET_TRNS_TO_ALPHA
- HAVE_DLSYM
Other remaining issues:
- compiler flags introduced in configure/make build
- HAVE_SYS_NDIR_H - maybe missing test in configure ?
- HAVE_SYS_DIR_H - maybe missing test in configure ?
- HAVE_NDIR_H - maybe missing test in configure ?
- WORDS_BIGENDIAN and #include <mac_endianness.h> ...
i.e. Mac OS X specific #include needed or not ?
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Configure and CMake now both check if X11/Xregion.h exists on the
build system and set HAVE_X11_XREGION_H in config.h accordingly.
src/Fl_Pixmap.cxx: modified to use the configure test as proposed by Manolo
in fltk.coredev on Dec 13 2015 in thread "Using X11 backend on OS X".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
so it is launchable by dropping any file on its icon. This is
done both for the configure/make and the CMake build systems
(the Xcode build system did that already).
The editor demo is the only one calling fl_open_callback().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
bundles it creates. This makes these apps support retina displays, because
the file contains
<key>NSHighResolutionCapable</key>
<true/>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
+[NSWindow frameRectForContentRect:styleMask:] message
(checked on 10.11 and 10.3). Therefore fluid -c will run without
opening the display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10979 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
without waiting for the next event to come, because AppleScript does not break the
event loop.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1) Changed the way fluid attaches images to widgets and menu items so
it is compatible with running fluid-generated code containing such images
in a static initializer. Images are now attached calling a function:
widget->image( image_function_name() );
and this function is defined before in fluid-generated code as:
static Fl_Image *image_function_name() {
static Fl_Image *image = new image_type(......);
return image;
}
2) Changed src/Fl_File_Chooser.fl so the source code generate by fluid
from it is compatible with running in a static initializer.
3) Changed src/Fl_File_Chooser.cxx and FL/Fl_File_Chooser.H
to the result of running fluid on src/Fl_File_Chooser.fl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
To make sure that fl_graphics_driver is initialized, it is enough to test whether it is null.
This saves the memory cost of a static variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10971 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
the static method Fl_Surface_Device::surface() can be called before main() starts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Browser::add(), Fl_Browser::insert(), and Fl_Browser::text() didn't
test if the provided text argument was NULL, although this was explicitly
allowed in the documentation.
Also applied some minor documentation fixes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10966 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Mac OS: a more convenient position where to initialize the fl_fonts global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
On the Mac platform, it is also necessary to change the initialization of
the macKeyLookUp array for keyboard events to work in a static
initializer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10962 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
On the Mac platform, it's also necessary to initialize the fl_fonts
global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10960 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
(which run before main() begins in an uncontrolled order). This was failing because
calls to drawing functions (e.g., fl_font(f,s);) crashed due to uninitialized fl_graphics_driver
global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Improved handling of the situations where a subwindow is created,
hidden, the parent window resized, and the subwindow shown,
with a new size. This change no longer sends setFrame: or setFrameOrigin:
messages to hidden subwindows. Instead, subwindows acquire their correct
size and position when they are shown again and Fl_X::map() is called.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10954 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
and builds itself the image when a window with subwindow is miniaturized. That is mostly OK, but it fails when a window
containing a subwindow is miniaturized (a mini image is computed), deminiaturized, the subwindow is removed
or hidden, and the window is miniaturized again: the old mini image is used, and that is not appropriate.
The solution is to remove the FLTK-computed mini image when a window with subwindow is deminiaturized.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10953 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_X::create_GLcontext_for_window() where it is directly relevant.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10947 ea41ed52-d2ee-0310-a9c1-e6b18d33e121