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. --- FL/x11.H | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'FL/x11.H') 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 directly; include instead." @@ -36,14 +51,21 @@ #endif #include +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); -- cgit v1.2.3