2022-03-04 17:40:29 +03:00
|
|
|
//
|
2022-03-15 08:42:06 +03:00
|
|
|
// Wayland/X11 hybrid platform header file for the Fast Light Tool Kit (FLTK).
|
2022-03-04 17:40:29 +03:00
|
|
|
//
|
2022-03-15 08:42:06 +03:00
|
|
|
// Copyright 1998-2022 by Bill Spitzak and others.
|
2022-03-04 17:40:29 +03:00
|
|
|
//
|
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
|
|
|
// https://www.fltk.org/COPYING.php
|
|
|
|
//
|
|
|
|
// Please see the following page on how to report bugs and issues:
|
|
|
|
//
|
|
|
|
// https://www.fltk.org/bugs.php
|
|
|
|
//
|
|
|
|
|
|
|
|
#if !defined(FL_PLATFORM_H)
|
|
|
|
# error "Never use <FL/wayland.H> directly; include <FL/platform.H> instead."
|
|
|
|
#endif // !FL_PLATFORM_H
|
|
|
|
|
2022-03-15 08:42:06 +03:00
|
|
|
/** \file
|
|
|
|
Definitions of functions specific to the Wayland platform.
|
|
|
|
*/
|
2022-03-04 17:40:29 +03:00
|
|
|
|
2022-03-15 08:42:06 +03:00
|
|
|
// *********** for Wayland component ***********
|
2022-03-04 17:40:29 +03:00
|
|
|
|
2022-05-09 10:41:50 +03:00
|
|
|
typedef struct _cairo cairo_t;
|
2022-03-10 17:05:26 +03:00
|
|
|
|
2022-03-15 08:42:06 +03:00
|
|
|
/** Returns the Wayland display in use */
|
|
|
|
extern FL_EXPORT struct wl_display *fl_wl_display();
|
|
|
|
/** Returns the wl_surface associated to a shown window */
|
|
|
|
extern FL_EXPORT struct wl_surface *fl_wl_surface(struct wld_window *xid);
|
|
|
|
/** Returns a platform-specific reference associated to a shown window */
|
|
|
|
extern FL_EXPORT struct wld_window *fl_wl_xid(const Fl_Window *win);
|
|
|
|
/** Returns the Fl_Window corresponding to a given the platform-specific window reference */
|
|
|
|
extern FL_EXPORT Fl_Window *fl_wl_find(struct wld_window *);
|
|
|
|
/** Returns the cairo context associated to the current window*/
|
|
|
|
extern FL_EXPORT cairo_t *fl_wl_cairo();
|
|
|
|
typedef void *EGLContext;
|
|
|
|
/** Returns the EGLContext corresponding to the given GLContext */
|
|
|
|
extern FL_EXPORT EGLContext fl_wl_glcontext(GLContext rc);
|
|
|
|
|
|
|
|
#ifndef FL_DOXYGEN
|
|
|
|
|
2022-09-09 16:19:15 +03:00
|
|
|
# if FLTK_USE_X11
|
2022-03-15 08:42:06 +03:00
|
|
|
// *********** for X11 component ***********
|
2022-09-09 16:19:15 +03:00
|
|
|
# include "x11.H"
|
2022-09-11 20:45:48 +03:00
|
|
|
# else
|
|
|
|
typedef struct wld_window *Window;
|
2022-09-09 16:19:15 +03:00
|
|
|
# endif
|
2022-03-15 08:42:06 +03:00
|
|
|
|
|
|
|
#endif // FL_DOXYGEN
|