- More Documentation
- Vulkan Configuration Implementations - Fixed build errors on GCC and Clang
This commit is contained in:
@@ -51,9 +51,9 @@ class display_server;
|
||||
///
|
||||
/// \details An implementation for a display server should inherit `display_server_base` and note the following:
|
||||
///
|
||||
/// For a server type \f$DisplayT\f$; any \f$gfxcontext\f$ implementation that wishes to implement \f$DisplayT\f$
|
||||
/// must provide a constructor that accepts a `DisplayT*`. `DisplayT::ctx_registry::register_type` must then be
|
||||
/// called for the \f$gfxcontext\f$ implementation.
|
||||
/// For a server type \emph{DisplayT}; any `gfxcontext` implementation that wishes to implement \emph{DisplayT}
|
||||
/// must provide a constructor that accepts a \emph{DisplayT*}. `DisplayT::ctx_registry::register_type()` must then be
|
||||
/// called for the `gfxcontext` implementation.
|
||||
class display_server : public type_registry<display_server, platform*> {
|
||||
// Definitions & Constants =============================================================================================
|
||||
public:
|
||||
@@ -136,13 +136,13 @@ public:
|
||||
///
|
||||
/// \brief feature support checking function
|
||||
/// \param feature the feature to check
|
||||
/// \returns \f$true\f$ if the feature is supported, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the feature is supported, \emph{false} otherwise
|
||||
bool has_feature(uint32_t feature) const {
|
||||
return features.test(feature);
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns \f$true\f$ if connected to the display server, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if connected to the display server, \emph{false} otherwise
|
||||
virtual bool connected() const = 0;
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -87,14 +87,16 @@ public:
|
||||
/// \brief constructor
|
||||
platform();
|
||||
|
||||
///
|
||||
/// \brief Copy Constructor
|
||||
/// \details Deleted, no semantics for copying a platform
|
||||
platform(const platform&) = delete;
|
||||
|
||||
///
|
||||
/// \brief destructor
|
||||
virtual ~platform() = default;
|
||||
|
||||
|
||||
private:
|
||||
platform(const platform&) = delete;
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
|
||||
@@ -164,15 +164,21 @@ public:
|
||||
|
||||
///
|
||||
/// \returns the current configuration of the window
|
||||
const config& get_config() const { return cfg; }
|
||||
const config& get_config() const {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the parent window
|
||||
window* get_parent() const { return parent; }
|
||||
window* get_parent() const {
|
||||
return parent;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the nearest top-level window in the hierarchy
|
||||
window* get_root() const { return root; }
|
||||
window* get_root() const {
|
||||
return root;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the underlying handle of the window
|
||||
@@ -208,19 +214,29 @@ public:
|
||||
|
||||
///
|
||||
/// \returns the width of the window
|
||||
int get_width() const { return state.rect.size.x; }
|
||||
int get_width() const {
|
||||
return state.rect.size.x;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the height of the window
|
||||
int get_height() const { return state.rect.size.y; }
|
||||
int get_height() const {
|
||||
return state.rect.size.y;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the x position of the window
|
||||
int get_pos_x() const { return state.rect.position.x; }
|
||||
int get_pos_x() const {
|
||||
return state.rect.position.x;
|
||||
}
|
||||
|
||||
///
|
||||
/// \returns the y position of the window
|
||||
int get_pos_y() const { return state.rect.position.y; }
|
||||
int get_pos_y() const {
|
||||
return state.rect.position.y;
|
||||
}
|
||||
|
||||
virtual void set_size(const ivec2& size) = 0;
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -234,22 +250,22 @@ public:
|
||||
|
||||
///
|
||||
/// \brief tests if the window is visible
|
||||
/// \returns \f$true\f$ if the window is visible, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is visible, \emph{false} otherwise
|
||||
bool is_visible() const { return state.flags.test(state_visible); }
|
||||
|
||||
///
|
||||
/// \brief tests if the window is a child
|
||||
/// \returns \f$true\f$ if the window is a child, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is a child, \emph{false} otherwise
|
||||
bool is_child() const { return state.flags.test(state_child); }
|
||||
|
||||
///
|
||||
/// \brief tests if the window is running
|
||||
/// \returns \f$true\f$ if the window is running, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is running, \emph{false} otherwise
|
||||
bool is_running() const { return state.flags.test(state_running); }
|
||||
|
||||
///
|
||||
/// \brief tests if the window is suspended
|
||||
/// \returns \f$true\f$ if the window is suspended, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is suspended, \emph{false} otherwise
|
||||
bool is_suspended() const { return state.flags.test(state_suspended); }
|
||||
|
||||
/// @}
|
||||
@@ -265,48 +281,48 @@ public:
|
||||
///
|
||||
/// \brief tests a specific flag
|
||||
/// \param flag the flag from `window::flag_`
|
||||
/// \returns \f$true\f$ if the flag is set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the flag is set, \emph{false} otherwise
|
||||
bool get_flag(uint8_t flag) const { return cfg.flags.test(flag); }
|
||||
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to always be on top of other windows
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_always_on_top() const { return get_flag(flag_always_on_top); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to have no window decorations
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_borderless() const { return get_flag(flag_borderless); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to be modal
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_modal() const { return get_flag(flag_modal); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to pass mouse input to windows underneath from the same application
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_passing_mouse() const { return get_flag(flag_pass_mouse); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged as a popup
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_popup() const { return get_flag(flag_popup); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to be resizable
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_resizable() const { return get_flag(flag_resizable); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to be transparent
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_transparent() const { return get_flag(flag_transparent); }
|
||||
|
||||
///
|
||||
/// \brief check if the window is flagged to be unfocusable
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_no_focus() const { return get_flag(flag_no_focus); }
|
||||
|
||||
|
||||
@@ -314,55 +330,55 @@ public:
|
||||
/// \brief sets a specific flag
|
||||
/// \param flag the flag from `window::flag_`
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
virtual bool set_flag(uint8_t flag, bool val) = 0;
|
||||
|
||||
///
|
||||
/// \brief sets whether to always be on top of other windows
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_always_on_top(bool val) { return set_flag(flag_always_on_top, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether to have no window decorations
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_borderless(bool val) { return set_flag(flag_borderless, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether to be modal
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_modal(bool val) { return set_flag(flag_modal, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether to pass mouse input to windows underneath from the same application
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_passing_mouse(bool val) { return set_flag(flag_pass_mouse, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether the window is a popup
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_popup(bool val) { return set_flag(flag_popup, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether to be resizable
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_resizable(bool val) { return set_flag(flag_resizable, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whetherto be transparent
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_transparent(bool val) { return set_flag(flag_transparent, val); }
|
||||
|
||||
///
|
||||
/// \brief sets whether to be unfocusable
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_no_focus(bool val) { return set_flag(flag_no_focus, val); }
|
||||
|
||||
/// @}
|
||||
@@ -385,10 +401,12 @@ public:
|
||||
|
||||
|
||||
// Protected Member Variables ==========================================================================================
|
||||
public:
|
||||
display_server* const server; //!< the display server the window belongs to
|
||||
window* const parent; //!< the parent window
|
||||
window* const root; //!< the nearest top-level window in the hierarchy
|
||||
|
||||
protected:
|
||||
display_server* const server; //!< the display server the window belongs to
|
||||
window* const parent; //!< the parent window
|
||||
window* root; //!< the nearest top-level window in the hierarchy
|
||||
config cfg; //!< the current configuration
|
||||
state state; //!< the current state
|
||||
unique_ptr<gfxsurface> gfx_surface; //!< the corresponding graphics surface
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
///
|
||||
/// \brief Platform Implementation for Linux-Based Operating Systems
|
||||
class linux_platform : public unix_platform {
|
||||
|
||||
// Constructors & Destructor ===========================================================================================
|
||||
@@ -31,7 +33,7 @@ public:
|
||||
/// \name Constructors & Destructor ================================================================================
|
||||
/// @{
|
||||
|
||||
/// \brief constructor
|
||||
/// \brief Linux Platform Constructor
|
||||
linux_platform()
|
||||
: unix_platform() {
|
||||
}
|
||||
@@ -39,11 +41,18 @@ public:
|
||||
/// @}
|
||||
|
||||
|
||||
//
|
||||
// Initialization ======================================================================================================
|
||||
|
||||
/// \name Initialization
|
||||
/// @{
|
||||
|
||||
void initialize() override; //!< platform initialization
|
||||
void shutdown() override; //!< platform shutdown
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
private:
|
||||
FENNEC_RTTI_CLASS_ENABLE(unix_platform) {
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by wayland-scanner 1.24.0 */
|
||||
/* Generated by wayland-scanner 1.25.0 */
|
||||
|
||||
#ifndef WAYLAND_CLIENT_PROTOCOL_H
|
||||
#define WAYLAND_CLIENT_PROTOCOL_H
|
||||
@@ -841,23 +841,9 @@ extern const struct wl_interface wl_subcompositor_interface;
|
||||
* hidden, or if a NULL wl_buffer is applied. These rules apply
|
||||
* recursively through the tree of surfaces.
|
||||
*
|
||||
* The behaviour of a wl_surface.commit request on a sub-surface
|
||||
* depends on the sub-surface's mode. The possible modes are
|
||||
* synchronized and desynchronized, see methods
|
||||
* wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
|
||||
* mode caches the wl_surface state to be applied when the parent's
|
||||
* state gets applied, and desynchronized mode applies the pending
|
||||
* wl_surface state directly. A sub-surface is initially in the
|
||||
* synchronized mode.
|
||||
*
|
||||
* Sub-surfaces also have another kind of state, which is managed by
|
||||
* wl_subsurface requests, as opposed to wl_surface requests. This
|
||||
* state includes the sub-surface position relative to the parent
|
||||
* surface (wl_subsurface.set_position), and the stacking order of
|
||||
* the parent and its sub-surfaces (wl_subsurface.place_above and
|
||||
* .place_below). This state is applied when the parent surface's
|
||||
* wl_surface state is applied, regardless of the sub-surface's mode.
|
||||
* As the exception, set_sync and set_desync are effective immediately.
|
||||
* A sub-surface can be in one of two modes. The possible modes are
|
||||
* synchronized and desynchronized, see methods wl_subsurface.set_sync and
|
||||
* wl_subsurface.set_desync.
|
||||
*
|
||||
* The main surface can be thought to be always in desynchronized mode,
|
||||
* since it does not have a parent in the sub-surfaces sense.
|
||||
@@ -869,6 +855,15 @@ extern const struct wl_interface wl_subcompositor_interface;
|
||||
* synchronized mode, and then assume that all its child and grand-child
|
||||
* sub-surfaces are synchronized, too, without explicitly setting them.
|
||||
*
|
||||
* If a surface behaves as in synchronized mode, it is effectively
|
||||
* synchronized, otherwise it is effectively desynchronized.
|
||||
*
|
||||
* A sub-surface is initially in the synchronized mode.
|
||||
*
|
||||
* The wl_subsurface interface has requests which modify double-buffered
|
||||
* state of the parent surface (wl_subsurface.set_position, .place_above and
|
||||
* .place_below).
|
||||
*
|
||||
* Destroying a sub-surface takes effect immediately. If you need to
|
||||
* synchronize the removal of a sub-surface to the parent surface update,
|
||||
* unmap the sub-surface first by attaching a NULL wl_buffer, update parent,
|
||||
@@ -899,23 +894,9 @@ extern const struct wl_interface wl_subcompositor_interface;
|
||||
* hidden, or if a NULL wl_buffer is applied. These rules apply
|
||||
* recursively through the tree of surfaces.
|
||||
*
|
||||
* The behaviour of a wl_surface.commit request on a sub-surface
|
||||
* depends on the sub-surface's mode. The possible modes are
|
||||
* synchronized and desynchronized, see methods
|
||||
* wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
|
||||
* mode caches the wl_surface state to be applied when the parent's
|
||||
* state gets applied, and desynchronized mode applies the pending
|
||||
* wl_surface state directly. A sub-surface is initially in the
|
||||
* synchronized mode.
|
||||
*
|
||||
* Sub-surfaces also have another kind of state, which is managed by
|
||||
* wl_subsurface requests, as opposed to wl_surface requests. This
|
||||
* state includes the sub-surface position relative to the parent
|
||||
* surface (wl_subsurface.set_position), and the stacking order of
|
||||
* the parent and its sub-surfaces (wl_subsurface.place_above and
|
||||
* .place_below). This state is applied when the parent surface's
|
||||
* wl_surface state is applied, regardless of the sub-surface's mode.
|
||||
* As the exception, set_sync and set_desync are effective immediately.
|
||||
* A sub-surface can be in one of two modes. The possible modes are
|
||||
* synchronized and desynchronized, see methods wl_subsurface.set_sync and
|
||||
* wl_subsurface.set_desync.
|
||||
*
|
||||
* The main surface can be thought to be always in desynchronized mode,
|
||||
* since it does not have a parent in the sub-surfaces sense.
|
||||
@@ -927,6 +908,15 @@ extern const struct wl_interface wl_subcompositor_interface;
|
||||
* synchronized mode, and then assume that all its child and grand-child
|
||||
* sub-surfaces are synchronized, too, without explicitly setting them.
|
||||
*
|
||||
* If a surface behaves as in synchronized mode, it is effectively
|
||||
* synchronized, otherwise it is effectively desynchronized.
|
||||
*
|
||||
* A sub-surface is initially in the synchronized mode.
|
||||
*
|
||||
* The wl_subsurface interface has requests which modify double-buffered
|
||||
* state of the parent surface (wl_subsurface.set_position, .place_above and
|
||||
* .place_below).
|
||||
*
|
||||
* Destroying a sub-surface takes effect immediately. If you need to
|
||||
* synchronize the removal of a sub-surface to the parent surface update,
|
||||
* unmap the sub-surface first by attaching a NULL wl_buffer, update parent,
|
||||
@@ -1307,6 +1297,7 @@ wl_callback_destroy(struct wl_callback *wl_callback)
|
||||
|
||||
#define WL_COMPOSITOR_CREATE_SURFACE 0
|
||||
#define WL_COMPOSITOR_CREATE_REGION 1
|
||||
#define WL_COMPOSITOR_RELEASE 2
|
||||
|
||||
|
||||
/**
|
||||
@@ -1317,6 +1308,10 @@ wl_callback_destroy(struct wl_callback *wl_callback)
|
||||
* @ingroup iface_wl_compositor
|
||||
*/
|
||||
#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_wl_compositor
|
||||
*/
|
||||
#define WL_COMPOSITOR_RELEASE_SINCE_VERSION 7
|
||||
|
||||
/** @ingroup iface_wl_compositor */
|
||||
static inline void
|
||||
@@ -1377,6 +1372,18 @@ wl_compositor_create_region(struct wl_compositor *wl_compositor)
|
||||
return (struct wl_region *) id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_compositor
|
||||
*
|
||||
* This request destroys the wl_compositor. This has no effect on any other objects.
|
||||
*/
|
||||
static inline void
|
||||
wl_compositor_release(struct wl_compositor *wl_compositor)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) wl_compositor,
|
||||
WL_COMPOSITOR_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_compositor), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
#define WL_SHM_POOL_CREATE_BUFFER 0
|
||||
#define WL_SHM_POOL_DESTROY 1
|
||||
#define WL_SHM_POOL_RESIZE 2
|
||||
@@ -1516,7 +1523,8 @@ enum wl_shm_error {
|
||||
*
|
||||
* The drm format codes match the macros defined in drm_fourcc.h, except
|
||||
* argb8888 and xrgb8888. The formats actually supported by the compositor
|
||||
* will be reported by the format event.
|
||||
* will be reported by the format event. See drm_fourcc.h for more detailed
|
||||
* format descriptions.
|
||||
*
|
||||
* For all wl_shm formats and unless specified in another protocol
|
||||
* extension, pre-multiplied alpha is used for pixel values.
|
||||
@@ -1978,6 +1986,86 @@ enum wl_shm_format {
|
||||
* 2x2 subsampled Cr:Cb plane 10 bits per channel packed
|
||||
*/
|
||||
WL_SHM_FORMAT_P030 = 0x30333050,
|
||||
/**
|
||||
* [47:0] R:G:B 16:16:16 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_RGB161616 = 0x38344752,
|
||||
/**
|
||||
* [47:0] B:G:R 16:16:16 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_BGR161616 = 0x38344742,
|
||||
/**
|
||||
* [15:0] R 16 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_R16F = 0x48202052,
|
||||
/**
|
||||
* [31:0] G:R 16:16 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_GR1616F = 0x48205247,
|
||||
/**
|
||||
* [47:0] B:G:R 16:16:16 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_BGR161616F = 0x48524742,
|
||||
/**
|
||||
* [31:0] R 32 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_R32F = 0x46202052,
|
||||
/**
|
||||
* [63:0] R:G 32:32 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_GR3232F = 0x46205247,
|
||||
/**
|
||||
* [95:0] R:G:B 32:32:32 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_BGR323232F = 0x46524742,
|
||||
/**
|
||||
* [127:0] R:G:B:A 32:32:32:32 little endian
|
||||
*/
|
||||
WL_SHM_FORMAT_ABGR32323232F = 0x46384241,
|
||||
/**
|
||||
* 2x1 subsampled Cr:Cb plane
|
||||
*/
|
||||
WL_SHM_FORMAT_NV20 = 0x3032564e,
|
||||
/**
|
||||
* non-subsampled Cr:Cb plane
|
||||
*/
|
||||
WL_SHM_FORMAT_NV30 = 0x3033564e,
|
||||
/**
|
||||
* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S010 = 0x30313053,
|
||||
/**
|
||||
* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S210 = 0x30313253,
|
||||
/**
|
||||
* non-subsampled Cb (1) and Cr (2) planes 10 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S410 = 0x30313453,
|
||||
/**
|
||||
* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S012 = 0x32313053,
|
||||
/**
|
||||
* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S212 = 0x32313253,
|
||||
/**
|
||||
* non-subsampled Cb (1) and Cr (2) planes 12 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S412 = 0x32313453,
|
||||
/**
|
||||
* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S016 = 0x36313053,
|
||||
/**
|
||||
* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S216 = 0x36313253,
|
||||
/**
|
||||
* non-subsampled Cb (1) and Cr (2) planes 16 bits per channel
|
||||
*/
|
||||
WL_SHM_FORMAT_S416 = 0x36313453,
|
||||
};
|
||||
#endif /* WL_SHM_FORMAT_ENUM */
|
||||
|
||||
@@ -1991,6 +2079,11 @@ struct wl_shm_listener {
|
||||
*
|
||||
* Informs the client about a valid pixel format that can be used
|
||||
* for buffers. Known formats include argb8888 and xrgb8888.
|
||||
*
|
||||
* Extensions to drm_fourcc.h (or the format enum) do not require
|
||||
* increasing the wl_shm version; as a result, clients may receive
|
||||
* format codes which were not in the list at the time the client
|
||||
* was made.
|
||||
* @param format buffer pixel format
|
||||
*/
|
||||
void (*format)(void *data,
|
||||
@@ -3056,6 +3149,7 @@ enum wl_data_device_manager_dnd_action {
|
||||
|
||||
#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE 0
|
||||
#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE 1
|
||||
#define WL_DATA_DEVICE_MANAGER_RELEASE 2
|
||||
|
||||
|
||||
/**
|
||||
@@ -3066,6 +3160,10 @@ enum wl_data_device_manager_dnd_action {
|
||||
* @ingroup iface_wl_data_device_manager
|
||||
*/
|
||||
#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_wl_data_device_manager
|
||||
*/
|
||||
#define WL_DATA_DEVICE_MANAGER_RELEASE_SINCE_VERSION 4
|
||||
|
||||
/** @ingroup iface_wl_data_device_manager */
|
||||
static inline void
|
||||
@@ -3126,6 +3224,19 @@ wl_data_device_manager_get_data_device(struct wl_data_device_manager *wl_data_de
|
||||
return (struct wl_data_device *) id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_data_device_manager
|
||||
*
|
||||
* This request destroys the wl_data_device_manager. This has no effect on any other
|
||||
* objects.
|
||||
*/
|
||||
static inline void
|
||||
wl_data_device_manager_release(struct wl_data_device_manager *wl_data_device_manager)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device_manager,
|
||||
WL_DATA_DEVICE_MANAGER_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
#ifndef WL_SHELL_ERROR_ENUM
|
||||
#define WL_SHELL_ERROR_ENUM
|
||||
enum wl_shell_error {
|
||||
@@ -3691,6 +3802,10 @@ enum wl_surface_error {
|
||||
* surface was destroyed before its role object
|
||||
*/
|
||||
WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 4,
|
||||
/**
|
||||
* no buffer was attached
|
||||
*/
|
||||
WL_SURFACE_ERROR_NO_BUFFER = 5,
|
||||
};
|
||||
#endif /* WL_SURFACE_ERROR_ENUM */
|
||||
|
||||
@@ -3795,6 +3910,7 @@ wl_surface_add_listener(struct wl_surface *wl_surface,
|
||||
#define WL_SURFACE_SET_BUFFER_SCALE 8
|
||||
#define WL_SURFACE_DAMAGE_BUFFER 9
|
||||
#define WL_SURFACE_OFFSET 10
|
||||
#define WL_SURFACE_GET_RELEASE 11
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_surface
|
||||
@@ -3857,6 +3973,10 @@ wl_surface_add_listener(struct wl_surface *wl_surface,
|
||||
* @ingroup iface_wl_surface
|
||||
*/
|
||||
#define WL_SURFACE_OFFSET_SINCE_VERSION 5
|
||||
/**
|
||||
* @ingroup iface_wl_surface
|
||||
*/
|
||||
#define WL_SURFACE_GET_RELEASE_SINCE_VERSION 7
|
||||
|
||||
/** @ingroup iface_wl_surface */
|
||||
static inline void
|
||||
@@ -3937,9 +4057,11 @@ wl_surface_destroy(struct wl_surface *wl_surface)
|
||||
* If a pending wl_buffer has been committed to more than one wl_surface,
|
||||
* the delivery of wl_buffer.release events becomes undefined. A well
|
||||
* behaved client should not rely on wl_buffer.release events in this
|
||||
* case. Alternatively, a client could create multiple wl_buffer objects
|
||||
* from the same backing storage or use a protocol extension providing
|
||||
* per-commit release notifications.
|
||||
* case. Instead, clients hitting this case should use
|
||||
* wl_surface.get_release or use a protocol extension providing per-commit
|
||||
* release notifications (if none of these options are available, a
|
||||
* fallback can be implemented by creating multiple wl_buffer objects from
|
||||
* the same backing storage).
|
||||
*
|
||||
* Destroying the wl_buffer after wl_buffer.release does not change
|
||||
* the surface contents. Destroying the wl_buffer before wl_buffer.release
|
||||
@@ -4120,21 +4242,48 @@ wl_surface_set_input_region(struct wl_surface *wl_surface, struct wl_region *reg
|
||||
* etc.) is double-buffered. Protocol requests modify the pending state,
|
||||
* as opposed to the active state in use by the compositor.
|
||||
*
|
||||
* A commit request atomically creates a content update from the pending
|
||||
* state, even if the pending state has not been touched. The content
|
||||
* update is placed in a queue until it becomes active. After commit, the
|
||||
* new pending state is as documented for each related request.
|
||||
*
|
||||
* When the content update is applied, the wl_buffer is applied before all
|
||||
* other state. This means that all coordinates in double-buffered state
|
||||
* are relative to the newly attached wl_buffers, except for
|
||||
* wl_surface.attach itself. If there is no newly attached wl_buffer, the
|
||||
* coordinates are relative to the previous content update.
|
||||
*
|
||||
* All requests that need a commit to become effective are documented
|
||||
* to affect double-buffered state.
|
||||
*
|
||||
* Other interfaces may add further double-buffered surface state.
|
||||
*
|
||||
* A commit request atomically creates a Content Update (CU) from the
|
||||
* pending state, even if the pending state has not been touched. The
|
||||
* content update is placed at the end of a per-surface queue until it
|
||||
* becomes active. After commit, the new pending state is as documented for
|
||||
* each related request.
|
||||
*
|
||||
* A CU is either a Desync Content Update (DCU) or a Sync Content Update
|
||||
* (SCU). If the surface is effectively synchronized at the commit request,
|
||||
* it is a SCU, otherwise a DCU.
|
||||
*
|
||||
* When a surface transitions from effectively synchronized to effectively
|
||||
* desynchronized, all SCUs in its queue which are not reachable by any
|
||||
* DCU become DCUs and dependency edges from outside the queue to these CUs
|
||||
* are removed.
|
||||
*
|
||||
* See wl_subsurface for the definition of 'effectively synchronized' and
|
||||
* 'effectively desynchronized'.
|
||||
*
|
||||
* When a CU is placed in the queue, the CU has a dependency on the CU in
|
||||
* front of it and to the SCU at end of the queue of every direct child
|
||||
* surface if that SCU exists and does not have another dependent. This can
|
||||
* form a directed acyclic graph of CUs with dependencies as edges.
|
||||
*
|
||||
* In addition to surface state, the CU can have constraints that must be
|
||||
* satisfied before it can be applied. Other interfaces may add CU
|
||||
* constraints.
|
||||
*
|
||||
* All DCUs which do not have a SCU in front of themselves in their queue,
|
||||
* are candidates. If the graph that's reachable by a candidate does not
|
||||
* have any unsatisfied constraints, the entire graph must be applied
|
||||
* atomically.
|
||||
*
|
||||
* When a CU is applied, the wl_buffer is applied before all other state.
|
||||
* This means that all coordinates in double-buffered state are relative to
|
||||
* the newly attached wl_buffers, except for wl_surface.attach itself. If
|
||||
* there is no newly attached wl_buffer, the coordinates are relative to
|
||||
* the previous content update.
|
||||
*/
|
||||
static inline void
|
||||
wl_surface_commit(struct wl_surface *wl_surface)
|
||||
@@ -4288,6 +4437,39 @@ wl_surface_offset(struct wl_surface *wl_surface, int32_t x, int32_t y)
|
||||
WL_SURFACE_OFFSET, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_surface
|
||||
*
|
||||
* Create a callback for the release of the buffer attached by the client
|
||||
* with wl_surface.attach.
|
||||
*
|
||||
* The compositor will release the buffer when it has finished its usage of
|
||||
* the underlying storage for the relevant commit. Once the client receives
|
||||
* this event, and assuming the associated buffer is not pending release
|
||||
* from other wl_surface.commit requests, the client can safely re-use the
|
||||
* buffer.
|
||||
*
|
||||
* Release callbacks are double-buffered state, and will be associated
|
||||
* with the pending buffer at wl_surface.commit time.
|
||||
*
|
||||
* The callback_data passed in the wl_callback.done event is unused and
|
||||
* is always zero.
|
||||
*
|
||||
* Sending this request without attaching a non-null buffer in the same
|
||||
* content update is a protocol error. The compositor will send the
|
||||
* no_buffer error in this case.
|
||||
*/
|
||||
static inline struct wl_callback *
|
||||
wl_surface_get_release(struct wl_surface *wl_surface)
|
||||
{
|
||||
struct wl_proxy *callback;
|
||||
|
||||
callback = wl_proxy_marshal_flags((struct wl_proxy *) wl_surface,
|
||||
WL_SURFACE_GET_RELEASE, &wl_callback_interface, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, NULL);
|
||||
|
||||
return (struct wl_callback *) callback;
|
||||
}
|
||||
|
||||
#ifndef WL_SEAT_CAPABILITY_ENUM
|
||||
#define WL_SEAT_CAPABILITY_ENUM
|
||||
/**
|
||||
@@ -6344,20 +6526,18 @@ wl_subsurface_destroy(struct wl_subsurface *wl_subsurface)
|
||||
/**
|
||||
* @ingroup iface_wl_subsurface
|
||||
*
|
||||
* This schedules a sub-surface position change.
|
||||
* This sets the position of the sub-surface, relative to the parent
|
||||
* surface.
|
||||
*
|
||||
* The sub-surface will be moved so that its origin (top left
|
||||
* corner pixel) will be at the location x, y of the parent surface
|
||||
* coordinate system. The coordinates are not restricted to the parent
|
||||
* surface area. Negative values are allowed.
|
||||
*
|
||||
* The scheduled coordinates will take effect whenever the state of the
|
||||
* parent surface is applied.
|
||||
*
|
||||
* If more than one set_position request is invoked by the client before
|
||||
* the commit of the parent surface, the position of a new request always
|
||||
* replaces the scheduled position from any previous request.
|
||||
*
|
||||
* The initial position is 0, 0.
|
||||
*
|
||||
* Position is double-buffered state on the parent surface, see
|
||||
* wl_subsurface and wl_surface.commit for more information.
|
||||
*/
|
||||
static inline void
|
||||
wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y)
|
||||
@@ -6375,13 +6555,11 @@ wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32
|
||||
* parent surface. Using any other surface, including this sub-surface,
|
||||
* will cause a protocol error.
|
||||
*
|
||||
* The z-order is double-buffered. Requests are handled in order and
|
||||
* applied immediately to a pending state. The final pending state is
|
||||
* copied to the active state the next time the state of the parent
|
||||
* surface is applied.
|
||||
*
|
||||
* A new sub-surface is initially added as the top-most in the stack
|
||||
* of its siblings and parent.
|
||||
*
|
||||
* Z-order is double-buffered state on the parent surface, see
|
||||
* wl_subsurface and wl_surface.commit for more information.
|
||||
*/
|
||||
static inline void
|
||||
wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling)
|
||||
@@ -6394,6 +6572,7 @@ wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface
|
||||
* @ingroup iface_wl_subsurface
|
||||
*
|
||||
* The sub-surface is placed just below the reference surface.
|
||||
*
|
||||
* See wl_subsurface.place_above.
|
||||
*/
|
||||
static inline void
|
||||
@@ -6407,18 +6586,9 @@ wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface
|
||||
* @ingroup iface_wl_subsurface
|
||||
*
|
||||
* Change the commit behaviour of the sub-surface to synchronized
|
||||
* mode, also described as the parent dependent mode.
|
||||
* mode.
|
||||
*
|
||||
* In synchronized mode, wl_surface.commit on a sub-surface will
|
||||
* accumulate the committed state in a cache, but the state will
|
||||
* not be applied and hence will not change the compositor output.
|
||||
* The cached state is applied to the sub-surface immediately after
|
||||
* the parent surface's state is applied. This ensures atomic
|
||||
* updates of the parent and all its synchronized sub-surfaces.
|
||||
* Applying the cached state will invalidate the cache, so further
|
||||
* parent surface commits do not (re-)apply old state.
|
||||
*
|
||||
* See wl_subsurface for the recursive effect of this mode.
|
||||
* See wl_subsurface and wl_surface.commit for more information.
|
||||
*/
|
||||
static inline void
|
||||
wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface)
|
||||
@@ -6431,24 +6601,9 @@ wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface)
|
||||
* @ingroup iface_wl_subsurface
|
||||
*
|
||||
* Change the commit behaviour of the sub-surface to desynchronized
|
||||
* mode, also described as independent or freely running mode.
|
||||
* mode.
|
||||
*
|
||||
* In desynchronized mode, wl_surface.commit on a sub-surface will
|
||||
* apply the pending state directly, without caching, as happens
|
||||
* normally with a wl_surface. Calling wl_surface.commit on the
|
||||
* parent surface has no effect on the sub-surface's wl_surface
|
||||
* state. This mode allows a sub-surface to be updated on its own.
|
||||
*
|
||||
* If cached state exists when wl_surface.commit is called in
|
||||
* desynchronized mode, the pending state is added to the cached
|
||||
* state, and applied as a whole. This invalidates the cache.
|
||||
*
|
||||
* Note: even if a sub-surface is set to desynchronized, a parent
|
||||
* sub-surface may override it to behave as synchronized. For details,
|
||||
* see wl_subsurface.
|
||||
*
|
||||
* If a surface's parent surface behaves as desynchronized, then
|
||||
* the cached state is applied on set_desync.
|
||||
* See wl_subsurface and wl_surface.commit for more information.
|
||||
*/
|
||||
static inline void
|
||||
wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by wayland-scanner 1.24.0 */
|
||||
/* Generated by wayland-scanner 1.25.0 */
|
||||
|
||||
#ifndef XDG_SHELL_CLIENT_PROTOCOL_H
|
||||
#define XDG_SHELL_CLIENT_PROTOCOL_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
void connect() override; //!< connect to wayland
|
||||
void disconnect() override; //!< disconnect from wayland
|
||||
bool connected() const override; //!< check if connected to wayland \returns \f$true\f$ if connected, \f$false\f$ otherwise
|
||||
bool connected() const override; //!< check if connected to wayland \returns \emph{true} if connected, \emph{false} otherwise
|
||||
|
||||
void dispatch() override; //!< dispatch the current context
|
||||
|
||||
|
||||
74
include/fennec/platform/linux/wayland/vulkan/context.h
Normal file
74
include/fennec/platform/linux/wayland/vulkan/context.h
Normal file
@@ -0,0 +1,74 @@
|
||||
// =====================================================================================================================
|
||||
// fennec, a free and open source game engine
|
||||
// Copyright © 2025 Medusa Slockbower
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
///
|
||||
/// \file context.h
|
||||
/// \brief
|
||||
///
|
||||
///
|
||||
/// \details
|
||||
/// \author Medusa Slockbower
|
||||
///
|
||||
/// \copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))
|
||||
///
|
||||
///
|
||||
|
||||
|
||||
#ifndef FENNEC_PLATFORM_LINUX_WAYLAND_VULKAN_CONTEXT_H
|
||||
#define FENNEC_PLATFORM_LINUX_WAYLAND_VULKAN_CONTEXT_H
|
||||
|
||||
#include <fennec/renderers/vulkan/vkcontext.h>
|
||||
#include <fennec/platform/linux/wayland/server.h>
|
||||
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
class wayland_vkcontext : public vkcontext {
|
||||
|
||||
// Definitions & Constants =============================================================================================
|
||||
public:
|
||||
|
||||
///
|
||||
/// \brief Required Extensions
|
||||
inline static const dynarray<cstring> extensions = {
|
||||
VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
|
||||
};
|
||||
|
||||
// Constructors & Destructor ===========================================================================================
|
||||
public:
|
||||
|
||||
explicit wayland_vkcontext(display_server* display);
|
||||
|
||||
~wayland_vkcontext();
|
||||
|
||||
// Operations ==========================================================================================================
|
||||
public:
|
||||
|
||||
gfxsurface* create_surface(window* window) override;
|
||||
|
||||
|
||||
// Private Member Variables ============================================================================================
|
||||
private:
|
||||
FENNEC_RTTI_CLASS_ENABLE(vkcontext) {
|
||||
wayland_server::ctx_registry::register_type<wayland_vkcontext>();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // FENNEC_PLATFORM_LINUX_WAYLAND_VULKAN_CONTEXT_H
|
||||
@@ -76,6 +76,8 @@ public:
|
||||
/// @}
|
||||
|
||||
|
||||
void set_size(const ivec2& size) override;
|
||||
|
||||
// Behaviour Flags =====================================================================================================
|
||||
public:
|
||||
|
||||
@@ -86,7 +88,7 @@ public:
|
||||
/// \brief sets a specific flag
|
||||
/// \param flag the flag from `window::flag_`
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} on success, \emph{false} otherwise
|
||||
bool set_flag(uint8_t flag, bool val) override;
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
//
|
||||
|
||||
///
|
||||
/// \returns \f$true\f$ if the context is valid, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the context is valid, \emph{false} otherwise
|
||||
bool is_valid() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/// \brief convert egl error to a readable string
|
||||
/// \param err the error code
|
||||
/// \returns the error string corresponding to \f$err\f$
|
||||
/// \returns the error string corresponding to \emph{err}
|
||||
inline fennec::cstring eglErrorString(EGLint err) {
|
||||
switch (err) {
|
||||
case EGL_SUCCESS: return "None";
|
||||
|
||||
2176
include/fennec/platform/vulkan/volk/volk.h
Normal file
2176
include/fennec/platform/vulkan/volk/volk.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -104,12 +104,13 @@ public:
|
||||
/// \brief destructor
|
||||
~window_manager();
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
private:
|
||||
///
|
||||
/// \brief Copy Constructor
|
||||
/// \details Deleted, no semantics for copying a platform
|
||||
window_manager(const window_manager&) = delete;
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
// Initialization & Update =============================================================================================
|
||||
public:
|
||||
@@ -247,7 +248,7 @@ public:
|
||||
/// \brief tests if the window is visible
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if the window is visible, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is visible, \emph{false} otherwise
|
||||
bool is_visible(window_id window) const {
|
||||
lock_guard guard(_lock);
|
||||
return _check_state(window, window::state_visible);
|
||||
@@ -257,7 +258,7 @@ public:
|
||||
/// \brief tests if the window is a child
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if the window is a child, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is a child, \emph{false} otherwise
|
||||
bool is_child(window_id window) const {
|
||||
lock_guard guard(_lock);
|
||||
return _check_state(window, window::state_child);
|
||||
@@ -267,7 +268,7 @@ public:
|
||||
/// \brief tests if the window is running
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if the window is running, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is running, \emph{false} otherwise
|
||||
bool is_running(window_id window) const {
|
||||
lock_guard guard(_lock);
|
||||
return _check_state(window, window::state_running);
|
||||
@@ -277,7 +278,7 @@ public:
|
||||
/// \brief tests if the window is suspended
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if the window is suspended, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the window is suspended, \emph{false} otherwise
|
||||
bool is_suspended(window_id window) const {
|
||||
lock_guard guard(_lock);
|
||||
return _check_state(window, window::state_suspended);
|
||||
@@ -297,7 +298,7 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param flag the flag from `window::flag_`
|
||||
/// \returns \f$true\f$ if the flag is set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if the flag is set, \emph{false} otherwise
|
||||
bool get_flag(window_id window, uint8_t flag) {
|
||||
lock_guard guard(_lock);
|
||||
return _get_flag(window, flag);
|
||||
@@ -308,7 +309,7 @@ public:
|
||||
/// \brief check if the window is flagged to always be on top of other windows
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_always_on_top(window_id window) {
|
||||
return get_flag(window, window::flag_always_on_top);
|
||||
}
|
||||
@@ -317,7 +318,7 @@ public:
|
||||
/// \brief check if the window is flagged to have no window decorations
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_borderless(window_id window) {
|
||||
return get_flag(window, window::flag_borderless);
|
||||
}
|
||||
@@ -326,7 +327,7 @@ public:
|
||||
/// \brief check if the window is flagged to be modal
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_modal(window_id window) {
|
||||
return get_flag(window, window::flag_modal);
|
||||
}
|
||||
@@ -335,7 +336,7 @@ public:
|
||||
/// \brief check if the window is flagged to pass mouse input to windows underneath from the same application
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_passing_mouse(window_id window) {
|
||||
return get_flag(window, window::flag_pass_mouse);
|
||||
}
|
||||
@@ -344,7 +345,7 @@ public:
|
||||
/// \brief check if the window is flagged as a popup
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_popup(window_id window) {
|
||||
return get_flag(window, window::flag_popup);
|
||||
}
|
||||
@@ -353,7 +354,7 @@ public:
|
||||
/// \brief check if the window is flagged to be resizable
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_resizable(window_id window) {
|
||||
return get_flag(window, window::flag_resizable);
|
||||
}
|
||||
@@ -362,7 +363,7 @@ public:
|
||||
/// \brief check if the window is flagged to be transparent
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_transparent(window_id window) {
|
||||
return get_flag(window, window::flag_transparent);
|
||||
}
|
||||
@@ -371,7 +372,7 @@ public:
|
||||
/// \brief check if the window is flagged to be unfocusable
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \returns \f$true\f$ if set, \f$false\f$ otherwise
|
||||
/// \returns \emph{true} if set, \emph{false} otherwise
|
||||
bool is_no_focus(window_id window) {
|
||||
return get_flag(window, window::flag_no_focus);
|
||||
}
|
||||
@@ -398,7 +399,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_always_on_top(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_always_on_top, val);
|
||||
}
|
||||
@@ -408,7 +408,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_borderless(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_borderless, val);
|
||||
}
|
||||
@@ -418,7 +417,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_modal(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_modal, val);
|
||||
}
|
||||
@@ -428,7 +426,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_passing_mouse(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_pass_mouse, val);
|
||||
}
|
||||
@@ -438,7 +435,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_popup(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_popup, val);
|
||||
}
|
||||
@@ -448,7 +444,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_resizable(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_resizable, val);
|
||||
}
|
||||
@@ -458,7 +453,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_transparent(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_transparent, val);
|
||||
}
|
||||
@@ -468,7 +462,6 @@ public:
|
||||
///
|
||||
/// \param window The window.
|
||||
/// \param val the value to set the flag to
|
||||
/// \returns \f$true\f$ on success, \f$false\f$ otherwise
|
||||
void set_no_focus(window_id window, bool val) {
|
||||
return set_flag(window, window::flag_no_focus, val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user