summaryrefslogtreecommitdiff
path: root/documentation/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-15 06:42:06 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-29 12:15:32 +0200
commitc720aae51515907ae82ee02df80bd084f291d4b1 (patch)
tree7fbf3569f35966891df68490b047b30c9ec20bcd /documentation/src
parent28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (diff)
Make hybrid Wayland/X11 platform.
Diffstat (limited to 'documentation/src')
-rw-r--r--documentation/src/intro.dox38
-rw-r--r--documentation/src/osissues.dox35
2 files changed, 49 insertions, 24 deletions
diff --git a/documentation/src/intro.dox b/documentation/src/intro.dox
index 89ac09ac8..7b827fd80 100644
--- a/documentation/src/intro.dox
+++ b/documentation/src/intro.dox
@@ -143,7 +143,13 @@ the toolkit, which was already in use by several people, Bill
came up with "FLTK", including a bogus excuse that it
stands for "The Fast Light Toolkit".
-\section intro_unix Building and Installing FLTK Under UNIX and Apple macOS
+\section intro_cmake Building and Installing FLTK with CMake
+
+Starting with version 1.4, the recommended FLTK building system
+is CMake. See file README.CMake of the FLTK source tree for all information.
+It's also possible to use \p configure and \p make as follows to build and install FLTK.
+
+\section intro_unix Building and Installing FLTK Under UNIX and macOS with make
In most cases you can just type "make". This will run configure with
the default of no options and then compile everything.
@@ -196,6 +202,9 @@ Enable debugging code & symbols
\par --disable-gl
Disable OpenGL support
+\par --disable-svg
+Disable support of reading and writing of Support Vector Graphics (.svg) files.
+
\par --disable-print
Disable print support for an X11 platform
@@ -205,22 +214,39 @@ Enable generation of shared libraries
\par --enable-threads
Enable multithreading support
-\par --enable-xdbe
-Enable the X double-buffer extension
+\par --enable-wayland
+Enable the use of Wayland for all window operations, of Cairo for all graphics
+and of Pango for text drawing (Linux and FreeBSD only). Resulting FLTK apps
+use Wayland if a Wayland compositor is available at run-time, and use
+the equivalent of "--enable-x11 --enable-usecairo" otherwise.
+
+\par --disable-xft
+Disables the Xft library, resulting in non anti-aliased fonts (X11 platform).
-\par --enable-xft
-Enable the Xft library for anti-aliased fonts under X11
+\par --enable-usecairo
+All drawing operations use the Cairo library (rather than Xlib) producing
+antialiased graphics (X11 platform, implies --enable-pango).
\par --enable-pango
-Enable the pango library for drawing any text in any script under X11.
+Enable the Pango library for drawing any text in any script with any font under X11.
\par --enable-x11
+This is the default under Unix and Linux.
When targeting cygwin, build with X11 GUI instead of windows GDI.
Also applicable to macOS platforms supplemented with XQuartz.
\par --enable-wayland
Enable use of the Wayland system for window handling.
+\par --enable-cairo
+Enable support of class Fl_Cairo_Window (all platforms, requires the Cairo library).
+
+\par --enable-cairoext
+Enable the FLTK instrumentation for cairo extended use (requires --enable-cairo).
+
+\par --disable-gdiplus
+Don't use GDI+ when drawing curves and oblique lines (Windows platform).
+
\par --enable-cp936
Under X11, enable use of the GB2312 locale
diff --git a/documentation/src/osissues.dox b/documentation/src/osissues.dox
index 999fced25..32328847b 100644
--- a/documentation/src/osissues.dox
+++ b/documentation/src/osissues.dox
@@ -88,6 +88,8 @@ Window fl_xid(const Fl_Window *)
\par
Returns the XID for a window, or zero if not \c shown().
+\deprecated Kept for compatibility with FLTK versions before 1.4.
+Use preferentially fl_x11_xid(const Fl_Window *) with versions 1.4 and above.
Fl_Window *fl_find(ulong xid)
@@ -96,6 +98,8 @@ Returns the Fl_Window that corresponds to the given
XID, or \c NULL if not found. This function uses a cache
so it is slightly faster than iterating through the windows
yourself.
+\deprecated Kept for compatibility with FLTK versions before 1.4.
+Use preferentially fl_x11_find(Window) with versions 1.4 and above.
int fl_handle(const XEvent &)
@@ -124,9 +128,11 @@ The following global variables are set before
Fl_Widget::draw() is called, or by Fl_Window::make_current():
\code
-extern Display *fl_display;
+extern Display *fl_display; // for compatibility with previous FLTK versions
+extern Display *fl_x11_display(); // preferred access starting with FLTK 1.4
extern Window fl_window;
-extern GC fl_gc;
+extern GC fl_gc; // for compatibility with previous FLTK versions
+extern GC fl_x11_gc(); // preferred access starting with FLTK 1.4
extern int fl_screen;
extern XVisualInfo *fl_visual;
extern Colormap fl_colormap;
@@ -559,9 +565,11 @@ called, FLTK stores all the extra arguments you need to
make a proper GDI call in some global variables:
\code
-extern HINSTANCE fl_display;
+extern HINSTANCE fl_display; // for compatibility with previous FLTK versions
+extern HINSTANCE fl_win32_display(); // preferred access starting with FLTK 1.4
extern HWND fl_window;
-extern HDC fl_gc;
+extern HDC fl_gc; // for compatibility with previous FLTK versions
+extern HDC fl_win32_gc(); // preferred access starting with FLTK 1.4
COLORREF fl_RGB();
HPEN fl_pen();
HBRUSH fl_brush();
@@ -931,17 +939,8 @@ FLTK uses UTF-8-encoded UNIX-style filenames and paths.
\section osissues_wayland The Wayland Interface
-Wayland-specific source code can be organized as follows to be distinguished
-from X11-specific source code :
-\code
-#include <FL/platform.H> // defines FLTK_USE_WAYLAND or FLTK_USE_X11 as appropriate
-
-#if defined(FLTK_USE_WAYLAND)
-… Wayland-specific source code …
-#elif defined(FLTK_USE_X11)
-… X11-specific source code …
-#endif
-\endcode
+See file README.Wayland.txt for details about how to organize platform-specific
+source code for the Wayland platform.
extern struct wl_display *fl_wl_display();
\par
@@ -950,16 +949,16 @@ struct wl_display representing the connection between the application and Waylan
For example, \c wl_display_get_fd(fl_wl_display()) gives the file descriptor one can
use to communicate with the Wayland compositor according to the Wayland protocol.
-Window fl_xid(const Fl_Window *)
+struct wld_window *fl_wl_xid(const Fl_Window *)
\par
Returns a pointer to an <u>FLTK-defined</u> structure holding Wayland-related
data created when a window gets show()'n, or NULL if not show()'n.
-Fl_Window *fl_find(Window wld_win)
+Fl_Window *fl_wl_find(struct wld_window * wld_win)
\par
Returns the Fl_Window that corresponds to the given Window, or NULL if not found.
-struct wl_surface *fl_wl_surface(Window wld_win)
+struct wl_surface *fl_wl_surface(struct wld_window *wld_win)
\par
Returns a pointer to the struct wl_surface corresponding to a show()'n
top-level window or subwindow.