From c720aae51515907ae82ee02df80bd084f291d4b1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 15 Mar 2022 06:42:06 +0100 Subject: Make hybrid Wayland/X11 platform. --- documentation/src/osissues.dox | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'documentation/src/osissues.dox') 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 // 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 FLTK-defined 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. -- cgit v1.2.3