Kanzi 4.0.0-beta2
kanzi::qnx::QnxEventMethods Class Reference

Class representing QNX event methods. More...

#include <kanzi/platform/platform/windowing_ng/qnx_screen/qnx_screen_event.hpp>

Inheritance diagram for kanzi::qnx::QnxEventMethods:
[legend]

Public Member Functions

KZ_NO_DISCARD optional< intgetButtonsProperty () const noexcept
 Tries to get the buttons property (SCREEN_PROPERTY_BUTTONS) of the QNX event.
 
KZ_NO_DISCARD optional< intgetEventType () const noexcept
 Tries to get the type (SCREEN_PROPERTY_TYPE) of the QNX event.
 
KZ_NO_DISCARD optional< intgetFlagsProperty () const noexcept
 Tries to get the key flags property (SCREEN_PROPERTY_FLAGS for QNX version 700 and above or SCREEN_PROPERTY_KEY_FLAGS for below) of the QNX event.
 
KZ_NO_DISCARD optional< intgetKeySymProperty () const noexcept
 Tries to get the key sym property (SCREEN_PROPERTY_SYM for QNX version 700 and above or SCREEN_PROPERTY_KEY_SYM for below) of the QNX event.
 
KZ_NO_DISCARD optional< intgetModifiersProperty () const noexcept
 Tries to get the modifiers property (SCREEN_PROPERTY_MODIFIERS for QNX version 700 and above or SCREEN_PROPERTY_KEY_MODIFIERS for below) of the QNX event.
 
KZ_NO_DISCARD optional< intgetMouseWheelProperty () const noexcept
 Tries to get the mouse wheel property (SCREEN_PROPERTY_MOUSE_WHEEL) of the QNX event.
 
KZ_NO_DISCARD optional< windowing::PositiongetPositionProperty () const noexcept
 Tries to get the position property (SCREEN_PROPERTY_POSITION) of the QNX event.
 
KZ_NO_DISCARD optional< intgetTouchIDProperty () const noexcept
 Tries to get the touch ID property (SCREEN_PROPERTY_TOUCH_ID) of the given QNX event.
 
- Public Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxEventMethods, KANZI_GENERATE_QNX_PROPERTY_HOST_SIGNATURE(event)>
KZ_NO_DISCARD optional< string > getPropertyCv (size_t stringBufferSize, int propertyName) const noexcept
 Gets QNX property consisting of a string.
 
KZ_NO_DISCARD optional< vector< int > > getPropertyIv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of ints.
 
KZ_NO_DISCARD optional< int > getPropertyIvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single int.
 
KZ_NO_DISCARD optional< vector< long long > > getPropertyLlv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of long longs.
 
KZ_NO_DISCARD optional< long long > getPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
KZ_NO_DISCARD optional< vector< T > > getPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
KZ_NO_DISCARD optional< T > getPropertyPvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single pointer.
 
bool setPropertyCv (int propertyName, string_view propertyValue) const noexcept
 Sets QNX property consisting of a string.
 
bool setPropertyIv (int propertyName, int propertyValue) const noexcept
 Sets QNX property consisting of a single int.
 
bool setPropertyIv (int propertyName, span< int > propertyValue) const noexcept
 Sets QNX property consisting of ints.
 
bool setPropertyLlv (int propertyName, long long propertyValue) const noexcept
 Sets QNX property consisting of a single long long.
 
bool setPropertyLlv (int propertyName, span< long long > propertyValue) const noexcept
 Sets QNX property consisting of long longs.
 
bool setPropertyPv (int propertyName, span< void * > propertyValue) const noexcept
 Sets QNX property consisting of pointers.
 
bool setPropertyPv (int propertyName, void *propertyValue) const noexcept
 Sets QNX property consisting of a single pointer.
 

Protected Member Functions

 QnxEventMethods () noexcept=default
 Constructor.
 
 QnxEventMethods (const NativeHandleType &handle) noexcept
 Constructor.
 
- Protected Member Functions inherited from kanzi::OptionalHandle< screen_event_t, nullptr, screen_destroy_event >
KZ_NO_DISCARD optional< screen_event_t > createOptional () const noexcept
 Creates a kanzi::optional copy of the native handle.
 
KZ_NO_DISCARD const screen_event_t get () const noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD screen_event_t get () noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD const screen_event_t getNativeHandle () const noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD screen_event_t getNativeHandle () noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD bool hasValue () const noexcept
 Checks if a handle is stored.
 
KZ_NO_DISCARD operator bool () const noexcept
 Conversion operator to bool.
 
KZ_NO_DISCARD screen_event_t && operator* () &&noexcept
 Provides access to stored handle via rvalue reference.
 
KZ_NO_DISCARD screen_event_t & operator* () &noexcept
 Provides access to stored handle via reference.
 
KZ_NO_DISCARD const screen_event_t && operator* () const &&noexcept
 Provides access to stored handle via const rvalue reference.
 
KZ_NO_DISCARD const screen_event_t & operator* () const &noexcept
 Provides access to stored handle via const reference.
 
OptionalHandleoperator= (const OptionalHandle &other)=delete
 Copy assignment operator.
 
OptionalHandleoperator= (const screen_event_t &value)
 Copy assignment operator.
 
OptionalHandleoperator= (OptionalHandle &&other) noexcept
 Move assignment operator.
 
OptionalHandleoperator= (screen_event_t &&value) noexcept
 Move assignment operator.
 
 OptionalHandle () noexcept
 Constructor.
 
 OptionalHandle (const OptionalHandle &other)=delete
 Copy constructor.
 
 OptionalHandle (const screen_event_t &nativeHandle) noexcept
 Constructor.
 
 OptionalHandle (OptionalHandle &&other) noexcept
 Move constructor.
 
screen_event_t release () noexcept
 Releases ownership of a native handle without destroying the resource.
 
void reset () noexcept
 Replaces stored handle with sentinel value.
 
void reset (U &&newHandle) noexcept
 Stores a new handle inside.
 
void swap (OptionalHandle &other)
 Swap function.
 
KZ_NO_DISCARD optional< screen_event_t > toOptional () &&noexcept
 Converts OptionalHandle to kanzi::optional.
 
 ~OptionalHandle ()
 Destructor.
 
- Protected Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxEventMethods, KANZI_GENERATE_QNX_PROPERTY_HOST_SIGNATURE(event)>
KZ_NO_DISCARD optional< string > getPropertyCv (size_t stringBufferSize, int propertyName) const noexcept
 Gets QNX property consisting of a string.
 
KZ_NO_DISCARD optional< vector< int > > getPropertyIv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of ints.
 
KZ_NO_DISCARD optional< int > getPropertyIvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single int.
 
KZ_NO_DISCARD optional< vector< long long > > getPropertyLlv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of long longs.
 
KZ_NO_DISCARD optional< long long > getPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
KZ_NO_DISCARD optional< vector< T > > getPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
KZ_NO_DISCARD optional< T > getPropertyPvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single pointer.
 
bool setPropertyCv (int propertyName, string_view propertyValue) const noexcept
 Sets QNX property consisting of a string.
 
bool setPropertyIv (int propertyName, int propertyValue) const noexcept
 Sets QNX property consisting of a single int.
 
bool setPropertyIv (int propertyName, span< int > propertyValue) const noexcept
 Sets QNX property consisting of ints.
 
bool setPropertyLlv (int propertyName, long long propertyValue) const noexcept
 Sets QNX property consisting of a single long long.
 
bool setPropertyLlv (int propertyName, span< long long > propertyValue) const noexcept
 Sets QNX property consisting of long longs.
 
bool setPropertyPv (int propertyName, span< void * > propertyValue) const noexcept
 Sets QNX property consisting of pointers.
 
bool setPropertyPv (int propertyName, void *propertyValue) const noexcept
 Sets QNX property consisting of a single pointer.
 

Static Protected Member Functions

static KZ_NO_DISCARD QnxEventMethods create () noexcept
 Tries to create an empty event.
 
- Static Protected Member Functions inherited from kanzi::OptionalHandle< screen_event_t, nullptr, screen_destroy_event >
static constexpr auto getDeleter () noexcept
 Gets deleter function.
 
static constexpr screen_event_t getSentinel () noexcept
 Gets sentinel value that can be used to represent invalid handle.
 

Additional Inherited Members

- Protected Types inherited from kanzi::OptionalHandle< screen_event_t, nullptr, screen_destroy_event >
using HandleType
 Alias for this handle type.
 
using NativeHandleType
 Alias for the underlying native handle type.
 
- Protected Attributes inherited from kanzi::OptionalHandle< screen_event_t, nullptr, screen_destroy_event >
FlatOptional< screen_event_t, sentinel > m_handle
 Native handle that is managed by this class.
 

Detailed Description

Class representing QNX event methods.

Note
Do not use this class directly. Use QnxEvent instead.
See also
QnxEvent
Since
Kanzi 4.0.0 changed to use QnxPropertyHost interface.
Kanzi 4.0.0 inherits from OptionalHandle.
Kanzi 4.0.0 QnxEvent is now a safe wrapper around QnxEventMethods.

Constructor & Destructor Documentation

◆ QnxEventMethods() [1/2]

kanzi::qnx::QnxEventMethods::QnxEventMethods ( )
explicitprotecteddefaultnoexcept

Constructor.

◆ QnxEventMethods() [2/2]

kanzi::qnx::QnxEventMethods::QnxEventMethods ( const NativeHandleType & handle)
explicitprotectednoexcept

Constructor.

Parameters
handleNative handle.

Member Function Documentation

◆ getEventType()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getEventType ( ) const
noexcept

Tries to get the type (SCREEN_PROPERTY_TYPE) of the QNX event.

Return values
nulloptTrying to get the type of the QNX event has failed.
Returns
QNX event type.
Since
Kanzi 4.0.0 renamed from tryGetEventType.
Kanzi 4.0.0 moved from being a free function.

◆ getKeySymProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getKeySymProperty ( ) const
noexcept

Tries to get the key sym property (SCREEN_PROPERTY_SYM for QNX version 700 and above or SCREEN_PROPERTY_KEY_SYM for below) of the QNX event.

Return values
nulloptTrying to get the key sym property has failed.
Returns
Key sym property.
Since
Kanzi 4.0.0 renamed from tryGetKeySymProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getModifiersProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getModifiersProperty ( ) const
noexcept

Tries to get the modifiers property (SCREEN_PROPERTY_MODIFIERS for QNX version 700 and above or SCREEN_PROPERTY_KEY_MODIFIERS for below) of the QNX event.

Return values
nulloptTrying to get the modifiers property has failed.
Returns
Modifiers property.
Since
Kanzi 4.0.0 renamed from tryGetModifiersProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getFlagsProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getFlagsProperty ( ) const
noexcept

Tries to get the key flags property (SCREEN_PROPERTY_FLAGS for QNX version 700 and above or SCREEN_PROPERTY_KEY_FLAGS for below) of the QNX event.

Return values
nulloptTrying to get the key flags property has failed.
Returns
Key flags property.
Since
Kanzi 4.0.0 renamed from tryGetFlagsProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getButtonsProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getButtonsProperty ( ) const
noexcept

Tries to get the buttons property (SCREEN_PROPERTY_BUTTONS) of the QNX event.

Return values
nulloptTrying to get the buttons property has failed.
Returns
Button property.
Since
Kanzi 4.0.0 renamed from tryGetButtonsProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getPositionProperty()

KZ_NO_DISCARD optional< windowing::Position > kanzi::qnx::QnxEventMethods::getPositionProperty ( ) const
noexcept

Tries to get the position property (SCREEN_PROPERTY_POSITION) of the QNX event.

Return values
nulloptTrying to get the position property has failed.
Returns
Position property.
Since
Kanzi 4.0.0 renamed from tryGetPositionProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getMouseWheelProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getMouseWheelProperty ( ) const
noexcept

Tries to get the mouse wheel property (SCREEN_PROPERTY_MOUSE_WHEEL) of the QNX event.

Return values
nulloptTrying to get the mouse wheel property has failed.
Returns
Mouse wheel property.
Since
Kanzi 4.0.0 renamed from tryGetMouseWheelProperty.
Kanzi 4.0.0 moved from being a free function.

◆ getTouchIDProperty()

KZ_NO_DISCARD optional< int > kanzi::qnx::QnxEventMethods::getTouchIDProperty ( ) const
noexcept

Tries to get the touch ID property (SCREEN_PROPERTY_TOUCH_ID) of the given QNX event.

Returns
An optional integer representing the touch ID.
Return values
nulloptTrying to get the touch ID property has failed.
Since
Kanzi 4.0.0

◆ create()

static KZ_NO_DISCARD QnxEventMethods kanzi::qnx::QnxEventMethods::create ( )
staticprotectednoexcept

Tries to create an empty event.

Returns
The created object. If error occurred, empty.
Since
Kanzi 4.0.0

The documentation for this class was generated from the following file: