Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
#include <Window.hpp>
Classes | |
struct | Private |
Public Member Functions | |
Window (const Window &)=delete | |
Window (Private, handle_t window_handle, const Recti &window_bounds, handle_t surface_handle, const Vec2i &surface_size) | |
Private ctor for single Window::create() method w/o public ctor. | |
~Window () noexcept override=default | |
Releases this instance. | |
void | addKeyListener (const KeyListenerRef &l) |
void | addPointerListener (const PointerListenerRef &l) |
void | addRenderListener (const RenderListenerRef &l) |
void | addWindowListener (const WindowListenerRef &l) |
void | display (const jau::fraction_timespec &when) noexcept |
void | dispose (const jau::fraction_timespec &when) noexcept override |
void | disposedNotify (const jau::fraction_timespec &when) noexcept override |
void | disposeRenderListener (bool clearRenderListener, const jau::fraction_timespec &when) noexcept |
constexpr bool | hasFocus () const noexcept |
constexpr bool | isPointerBLOriented () const noexcept |
Returns true if this window delivers PointerEvent in OpenGL's coordinate system, origin at bottom left. | |
bool | isValid () const noexcept override |
constexpr bool | isVisible () const noexcept |
size_t | keyListenerCount () const noexcept |
const KeyboardTracker & | keyTracker () const noexcept |
SurfaceRef | nativeSurface () |
Returns the associated Surface of this SurfaceHolder . | |
void | notifyKeyPressed (const jau::fraction_timespec &when, VKeyCode keySym, InputModifier keySymMods, uint16_t keyChar) noexcept |
void | notifyKeyReleased (const jau::fraction_timespec &when, VKeyCode keySym, InputModifier keySymMods, uint16_t keyChar) noexcept |
void | notifyPointer (uint16_t type, const jau::fraction_timespec &when, PointerType ptype, uint16_t id, jau::math::Vec2i pos, uint16_t clickCount, InputButton button, jau::math::Vec3f rotation, float rotationScale) noexcept |
void | notifyWindowEvent (uint16_t type, const jau::fraction_timespec &when, bool value=true) noexcept |
void | notifyWindowMoved (const jau::fraction_timespec &when, const jau::math::Vec2i &winPos) noexcept |
void | notifyWindowResize (const jau::fraction_timespec &when, const jau::math::Vec2i &winSize, const jau::math::Vec2i &surfSize) noexcept |
void | operator= (const Window &)=delete |
size_t | pointerListenerCount () const noexcept |
size_t | removeAllKeyListener () |
size_t | removeAllPointerListener () |
size_t | removeAllRenderListener () |
size_t | removeAllWindowListener () |
size_t | removeKeyListener (const KeyListenerRef &l) |
size_t | removePointerListener (const PointerListenerRef &l) |
size_t | removeRenderListener (const RenderListenerRef &l) |
size_t | removeWindowListener (const WindowListenerRef &l) |
size_t | renderListenerCount () const noexcept |
const WindowRef | shared () |
constexpr WindowState | state () const noexcept |
bool | surfaceSwap () noexcept override |
Provide a mechanism to utilize custom (pre-) swap surface code. | |
std::string | toString () const noexcept |
constexpr const Recti & | windowBounds () const noexcept |
Returns the window client-area top-left position and size excluding insets (window decorations) in window units. | |
constexpr handle_t | windowHandle () const noexcept |
Returns the handle to the surface for this NativeSurface. | |
size_t | windowListenerCount () const noexcept |
constexpr Vec2i | windowPos () const noexcept |
Returns the window top-lect position of client-area in window units. | |
constexpr Vec2i | windowSize () const noexcept |
Returns the window size of the client area excluding insets (window decorations) in window units. | |
![]() | |
Surface (const Surface &)=delete | |
Surface (Private, handle_t surface_handle, const Vec2i &surface_size) | |
Private ctor for single Surface::create() method w/o public ctor. | |
virtual | ~Surface () noexcept |
Releases this instance. | |
const Capabilities * | capabilities () const noexcept |
bool | createContext (const gamp::render::RenderProfile &profile, const gamp::render::RenderContextFlags &contextFlags) |
constexpr bool | isBLOriented () const noexcept |
Returns true if this surface is rendered in OpenGL's coordinate system, origin at bottom left. | |
lock_status_t | lockSurface () |
Lock the surface of this native window. | |
void | operator= (const Surface &)=delete |
const gamp::render::RenderContext * | renderContext () const noexcept |
gamp::render::RenderContext * | renderContext () noexcept |
bool | setSwapInterval (int v) noexcept |
Returns true if swap interval could be set with the native toolkit post createContext(). | |
const SurfaceRef | shared () |
constexpr handle_t | surfaceHandle () const noexcept |
Returns the handle to the surface for this NativeSurface. | |
constexpr const Vec2i & | surfaceSize () const noexcept |
Returns the surface size of the client area excluding insets (window decorations) in pixel units. | |
constexpr int | swapInterval () const noexcept |
Returns desired or determined swap interval. | |
std::string | toString () const noexcept |
void | unlockSurface () |
Unlock the surface of this native window. | |
Static Public Member Functions | |
static WindowRef | create (const char *title, int wwidth, int wheight, bool verbose=false) |
Create an new instance using a native windowing toolkit. | |
static WindowRef | wrapNative (handle_t window_handle, const Recti &window_bounds, handle_t surface_handle, const Vec2i &surface_size) |
Create an new instance, wrapping the native windowing toolkit's handle/resources. | |
![]() | |
static SurfaceRef | create (handle_t surface_handle, const Vec2i &surface_size) |
static gamp::render::RenderContextPtr | createContext (const wt::SurfaceRef &surface, const gamp::render::RenderProfile &profile, const gamp::render::RenderContextFlags &contextFlags, gamp::render::RenderContext *shareWith) noexcept |
static constexpr bool | is_locked (const lock_status_t ls) noexcept |
Protected Member Functions | |
void | setFocused (bool v) noexcept |
void | setVisible (bool v) noexcept |
void | setWindowBounds (const Recti &r) noexcept |
void | setWindowPos (const Vec2i &sz) noexcept |
void | setWindowSize (const Vec2i &sz) noexcept |
![]() | |
virtual lock_status_t | nativeSurfaceLock () noexcept |
virtual void | nativeSurfaceUnlock () noexcept |
void | setSurfaceSize (const Vec2i &sz) noexcept |
template<typename ChildT> | |
std::shared_ptr< ChildT > | shared_from_base () |
Additional Inherited Members | |
![]() | |
enum class | lock_status_t : uint16_t { unlocked , not_ready , locked_changed , locked_same } |
![]() | |
static constexpr const jau::fraction_i64 | TIMEOUT = 5_s |
Definition at line 132 of file Window.hpp.
|
inline |
Private ctor for single Window::create() method w/o public ctor.
Definition at line 182 of file Window.hpp.
|
delete |
|
overridedefaultnoexcept |
Releases this instance.
|
inlineprotectednoexcept |
Definition at line 150 of file Window.hpp.
|
inlineprotectednoexcept |
Definition at line 151 of file Window.hpp.
|
inlineprotectednoexcept |
Definition at line 152 of file Window.hpp.
|
inlineprotectednoexcept |
Definition at line 153 of file Window.hpp.
|
inlineprotectednoexcept |
Definition at line 154 of file Window.hpp.
|
inlinestatic |
Create an new instance, wrapping the native windowing toolkit's handle/resources.
Must be driven by a native toolkit implementation, see create() below.
Definition at line 199 of file Window.hpp.
|
static |
Create an new instance using a native windowing toolkit.
Definition at line 195 of file gamp_sdl2.cpp.
|
delete |
|
inline |
Returns the associated Surface
of this SurfaceHolder
.
Returns this instance, which is-a Surface
.
Definition at line 226 of file Window.hpp.
|
inline |
|
inlineconstexprnoexcept |
Returns the window top-lect position of client-area in window units.
Definition at line 230 of file Window.hpp.
|
inlineconstexprnoexcept |
Returns the window size of the client area excluding insets (window decorations) in window units.
Definition at line 233 of file Window.hpp.
|
inlineconstexprnoexcept |
Returns the window client-area top-left position and size excluding insets (window decorations) in window units.
Definition at line 236 of file Window.hpp.
|
inlineconstexprnoexcept |
Returns true
if this window delivers PointerEvent in OpenGL's coordinate system, origin at bottom left.
Otherwise returns false
, i.e. origin at top left.
Default impl. is isBLOriented(), i.e. true
for OpenGL bottom-left coordinate system.
Definition at line 247 of file Window.hpp.
|
inlineconstexprnoexcept |
Returns the handle to the surface for this NativeSurface.
The surface handle should be set/update by lockSurface()
, where unlockSurface()
is not allowed to modify it. After unlockSurface()
it is no more guaranteed that the surface handle is still valid.
The surface handle shall reflect the platform one for all drawable surface operations, e.g. opengl, swap-buffer.
On X11 this returns an entity of type Window, since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.
Definition at line 264 of file Window.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Surface.
Definition at line 265 of file Window.hpp.
|
inlineconstexprnoexcept |
Definition at line 267 of file Window.hpp.
|
inlineconstexprnoexcept |
Definition at line 268 of file Window.hpp.
|
inlineconstexprnoexcept |
Definition at line 269 of file Window.hpp.
|
noexcept |
Definition at line 78 of file gamp_wt.cpp.
|
overridevirtualnoexcept |
Provide a mechanism to utilize custom (pre-) swap surface code.
This method is called before the render toolkit (e.g. JOGL) swaps the buffer/surface if double buffering is enabled.
The implementation may itself apply the swapping, in which case true shall be returned.
Reimplemented from gamp::wt::Surface.
Definition at line 205 of file gamp_sdl2_gl.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
Definition at line 295 of file Window.hpp.
|
inline |
Definition at line 296 of file Window.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Definition at line 312 of file Window.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Definition at line 326 of file Window.hpp.
|
inlinenoexcept |
Definition at line 327 of file Window.hpp.
|
inline |
|
inline |
Definition at line 335 of file Window.hpp.
|
inline |
Definition at line 340 of file Window.hpp.
|
inlinenoexcept |
Definition at line 346 of file Window.hpp.
|
noexcept |
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Surface.
Definition at line 350 of file Window.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Surface.
Definition at line 355 of file Window.hpp.
|
noexcept |