Add the Wayland platform to FLTK 1.4

This commit is contained in:
ManoloFLTK
2022-03-04 15:40:29 +01:00
parent a773fdc44b
commit 3718effc43
61 changed files with 18951 additions and 897 deletions
+2
View File
@@ -37,6 +37,8 @@ class Fl_Window;
# include "win32.H"
# elif defined(__APPLE__)
# include "mac.H"
# elif defined(FLTK_USE_WAYLAND)
# include "wayland.H"
# elif defined(FLTK_USE_X11)
# include "x11.H"
# endif // _WIN32
+12 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2018 by Bill Spitzak and others.
* Copyright 2016-2022 by Bill Spitzak and others.
*
* 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
@@ -116,6 +116,17 @@ typedef struct HGLRC__ *GLContext;
struct dirent {char d_name[1];};
#endif
#elif defined(FLTK_USE_WAYLAND)
typedef struct fl_wld_buffer *Fl_Offscreen; /**< an offscreen drawing buffer */
typedef struct _cairo_pattern* Fl_Bitmask;
typedef struct flWaylandRegion* Fl_Region;
typedef int FL_SOCKET; /**< socket or file descriptor */
typedef void *EGLContext;
typedef EGLContext GLContext;
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#elif defined(FLTK_USE_X11)
typedef unsigned long Fl_Offscreen;
Executable
+31
View File
@@ -0,0 +1,31 @@
//
// Wayland platform header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2021 by Bill Spitzak and others.
//
// 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
typedef struct wld_window *Window;
extern struct wl_display *fl_display;
struct flWaylandRegion {
int count;
struct _cairo_rectangle *rects;
}; // a region is the union of a series of rectangles
#include <stdint.h>
extern FL_EXPORT uint32_t fl_event_time;