summaryrefslogtreecommitdiff
path: root/FL/x11.H
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 /FL/x11.H
parent28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (diff)
Make hybrid Wayland/X11 platform.
Diffstat (limited to 'FL/x11.H')
-rw-r--r--FL/x11.H24
1 files changed, 23 insertions, 1 deletions
diff --git a/FL/x11.H b/FL/x11.H
index 116870166..56ca43b08 100644
--- a/FL/x11.H
+++ b/FL/x11.H
@@ -18,7 +18,22 @@
// include this file if FLTK_USE_X11 is defined. This is to encourage
// portability of even the system-specific code...
-#ifndef FL_DOXYGEN
+#ifdef FL_DOXYGEN
+
+/** \file
+ Definitions of functions specific to the X11 platform.
+*/
+
+/** Returns the X11 Display in use */
+extern Display *fl_x11_display();
+/** Returns the Window reference for the given Fl_Window, or zero if not \c shown(). */
+extern Window fl_x11_xid(const Fl_Window *win);
+/** Returns the Fl_Window corresponding to the given Window reference. */
+extern Fl_Window *fl_x11_find(Window xid);
+/** Returns the X11-specific currently active graphics context. */
+extern GC fl_x11_gc();
+
+#else // ! FL_DOXYGEN
#ifndef FL_PLATFORM_H
# error "Never use <FL/x11.H> directly; include <FL/platform.H> instead."
@@ -36,14 +51,21 @@
#endif
#include <X11/Xatom.h>
+typedef struct __GLXcontextRec *GLXContext;
+extern GLXContext fl_x11_glcontext(GLContext rc);
+
// constant info about the X server connection:
extern FL_EXPORT Display *fl_display;
+extern FL_EXPORT Display *fl_x11_display();
+extern FL_EXPORT Window fl_x11_xid(const Fl_Window *win);
+extern FL_EXPORT Fl_Window *fl_x11_find(Window);
extern FL_EXPORT int fl_screen;
extern FL_EXPORT XVisualInfo *fl_visual;
extern FL_EXPORT Colormap fl_colormap;
// drawing functions:
extern FL_EXPORT GC fl_gc;
+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);