FLTK 1.4.0
Loading...
Searching...
No Matches
wayland.H
Go to the documentation of this file.
1//
2// Wayland/X11 hybrid platform header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2022 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17#if !defined(FL_PLATFORM_H)
18# error "Never use <FL/wayland.H> directly; include <FL/platform.H> instead."
19#endif // !FL_PLATFORM_H
20
25// *********** for Wayland component ***********
26
27typedef struct _cairo cairo_t;
28
30extern FL_EXPORT struct wl_display *fl_wl_display();
32extern FL_EXPORT struct wl_surface *fl_wl_surface(struct wld_window *xid);
34extern FL_EXPORT struct wld_window *fl_wl_xid(const Fl_Window *win);
36extern FL_EXPORT Fl_Window *fl_wl_find(struct wld_window *);
38extern FL_EXPORT cairo_t *fl_wl_gc();
45extern FL_EXPORT struct wl_compositor *fl_wl_compositor();
46typedef void *EGLContext;
48extern FL_EXPORT EGLContext fl_wl_glcontext(GLContext rc);
49
50#ifndef FL_DOXYGEN
51
52# ifdef FLTK_USE_X11
53// *********** for X11 component ***********
54# include "x11.H"
55# else
56 typedef struct wld_window *Window;
57# endif
58
59#endif // FL_DOXYGEN
This widget produces an actual window.
Definition Fl_Window.H:55
struct opaque * GLContext
Pointer to a platform-specific structure representing the window's OpenGL rendering context.
Definition platform_types.h:66
EGLContext fl_wl_glcontext(GLContext rc)
Returns the EGLContext corresponding to the given GLContext.
Fl_Window * fl_wl_find(struct wld_window *)
Returns the Fl_Window corresponding to a given the platform-specific window reference.
struct wl_surface * fl_wl_surface(struct wld_window *xid)
Returns the wl_surface associated to a shown window.
struct wld_window * fl_wl_xid(const Fl_Window *win)
Returns a platform-specific reference associated to a shown window.
cairo_t * fl_wl_gc()
Returns the cairo context associated to the current window or Fl_Image_Surface.
struct wl_compositor * fl_wl_compositor()
Returns the wl_compositor of the current Wayland session.
struct wl_display * fl_wl_display()
Returns the Wayland display in use.
Definitions of functions specific to the X11 platform.