summaryrefslogtreecommitdiff
path: root/FL/x11.H
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 /FL/x11.H
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 'FL/x11.H')
-rw-r--r--FL/x11.H7
1 files changed, 6 insertions, 1 deletions
diff --git a/FL/x11.H b/FL/x11.H
index a86b605f2..73af4e7fc 100644
--- a/FL/x11.H
+++ b/FL/x11.H
@@ -32,7 +32,8 @@ extern Window fl_x11_xid(const Fl_Window *win);
extern Fl_Window *fl_x11_find(Window xid);
/** Returns the X11-specific currently active graphics context. */
extern GC fl_x11_gc();
-
+/** Returns the Cairo-specific currently active graphics context (OPTION_USE_CAIRO=On) */
+extern cairo_t* fl_cairo_gc();
#else // ! FL_DOXYGEN
#ifndef FL_PLATFORM_H
@@ -65,6 +66,10 @@ extern FL_EXPORT Colormap fl_colormap;
// drawing functions:
extern FL_EXPORT GC fl_gc;
+#if FLTK_USE_CAIRO
+ typedef struct _cairo cairo_t;
+ extern FL_EXPORT cairo_t* fl_cairo_gc();
+#endif
extern FL_EXPORT GC fl_x11_gc();
FL_EXPORT ulong fl_xpixel(Fl_Color i);
FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b);