summaryrefslogtreecommitdiff
path: root/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-13 10:02:40 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-13 10:02:40 +0200
commitcaaa11a96f8448bd78cb270e4861f5e9ff1a6763 (patch)
tree1d3e10cce9d26b62ca053f8d911dcd81d098942c /src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx
parente6c9deb4a4fca8e7f0241e74ec242213628de6b6 (diff)
Standardize API to "graphics context" across platforms
Rename fl_wl_cairo() to fl_wl_gc() Add function cairo_t* fl_cairo_gc() under OPTION_USE_CAIRO
Diffstat (limited to 'src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx
index d673c3dfa..3ad9a0d88 100644
--- a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx
+++ b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx
@@ -62,3 +62,7 @@ void Fl_X11_Cairo_Graphics_Driver::gc(void *value) {
void *Fl_X11_Cairo_Graphics_Driver::gc() {
return gc_;
}
+
+extern FL_EXPORT cairo_t* fl_cairo_gc() {
+ return ((Fl_Cairo_Graphics_Driver*)fl_graphics_driver)->cr();
+}