|
|
commit 20c50312fcd807fdee6c907a9a8af250f79d02b0
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon May 9 09:41:50 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon May 9 09:41:50 2022 +0200
Cleaner declaration of public function fl_wl_cairo().
FL/wayland.H | 3 ++-
documentation/src/osissues.dox | 6 +++---
src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git FL/wayland.H FL/wayland.H
index 9918e1f..bd5f8a8 100644
--- FL/wayland.H
+++ FL/wayland.H
@@ -26,7 +26,8 @@ struct flCairoRegion {
}; // a region is the union of a series of rectangles
#include <stdint.h>
+typedef struct _cairo cairo_t;
FL_EXPORT struct wl_display *fl_wl_display();
FL_EXPORT struct wl_surface *fl_wl_surface(Window xid);
-FL_EXPORT struct _cairo *fl_wl_cairo();
+FL_EXPORT cairo_t *fl_wl_cairo();
diff --git documentation/src/osissues.dox documentation/src/osissues.dox
index 583cff3..999fced 100644
--- documentation/src/osissues.dox
+++ documentation/src/osissues.dox
@@ -964,13 +964,13 @@ struct wl_surface *fl_wl_surface(Window wld_win)
Returns a pointer to the struct wl_surface corresponding to a show()'n
top-level window or subwindow.
-struct _cairo *fl_wl_cairo(void)
+cairo_t *fl_wl_cairo(void)
\par
Drawing natively to a Wayland window : Within an overridden Fl_Widget::draw() method,
or after a call to Fl_Window::make_current(), it's possible to draw
<u>using the Cairo library</u>. Function \c fl_wl_cairo() returns the adequate
-\c cairo_t* (equivalent to <tt>struct _cairo*</tt>) value. All FLTK-defined
-drawing functions (e.g., fl_rect(), fl_draw()) can be used too.
+\c cairo_t* value. Regular FLTK coordinates, with top-left origin, are to be used.
+All FLTK-defined drawing functions (e.g., fl_rect(), fl_draw()) can be used too.
void fl_close_display()
\par
diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index e7377cc..4cd6142 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1543,7 +1543,7 @@ struct wl_surface *fl_wl_surface(Window xid) {
}
-struct _cairo *fl_wl_cairo() {
+cairo_t *fl_wl_cairo() {
return ((Fl_Cairo_Graphics_Driver*)fl_graphics_driver)->cr();
}
[ Direct Link to Message ] | |
|
| |