Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Windows::Graphics::Properties Class Reference

Represents a set of run-time bindable and discoverable properties that allow a data-driven application to modify the state of a Direct2D effect. More...

#include <HWGraphics.h>

Inheritance diagram for Harlinn::Windows::Graphics::Properties:
[legend]
Collaboration diagram for Harlinn::Windows::Graphics::Properties:
[legend]

Public Types

using Base = Unknown
 
- Public Types inherited from Harlinn::Common::Core::Unknown
typedef IUnknown InterfaceType
 

Public Member Functions

UINT32 GetPropertyCount () const
 Gets the number of top-level properties.
 
bool GetPropertyName (UINT32 index, PWSTR nameBuffer, UINT32 nameBufferSize) const
 Gets the property name that corresponds to the given index.
 
UINT32 GetPropertyNameLength (UINT32 index) const
 Gets the number of characters for the given property name.
 
D2D1_PROPERTY_TYPE GetType (UINT32 index) const
 Gets the D2D1_PROPERTY_TYPE of the selected property.
 
UINT32 GetPropertyIndex (PCWSTR propertyName) const
 Gets the index corresponding to the given property name.
 
void SetValueByName (PCWSTR propertyName, D2D1_PROPERTY_TYPE propertyType, const BYTE *data, UINT32 dataSize) const
 Sets the named property to the given value.
 
void SetValue (UINT32 propertyIndex, D2D1_PROPERTY_TYPE propertyType, const BYTE *data, UINT32 dataSize) const
 Sets the corresponding property by index.
 
void GetValueByName (PCWSTR propertyName, D2D1_PROPERTY_TYPE propertyType, BYTE *data, UINT32 dataSize) const
 Retrieves the given property or sub-property by name. '.' is the delimiter for sub-properties.
 
void GetValue (UINT32 index, D2D1_PROPERTY_TYPE propertyType, BYTE *data, UINT32 dataSize) const
 Gets the value of the specified property by index.
 
UINT32 GetValueSize (UINT32 index) const
 Gets the size of the property value in bytes, using the property index.
 
bool GetSubProperties (UINT32 index, ID2D1Properties **subProperties) const
 Retrieves the sub-properties of the given property by index.
 
Properties GetSubProperties (UINT32 index) const
 
void SetValueByName (PCWSTR name, const BYTE *data, UINT32 dataSize) const
 
void SetValue (UINT32 index, const BYTE *data, UINT32 dataSize) const
 
void GetValueByName (PCWSTR name, BYTE *data, UINT32 dataSize) const
 
void GetValue (UINT32 index, BYTE *data, UINT32 dataSize) const
 
template<typename T >
void GetValueByName (PCWSTR propertyName, T *value) const
 
template<typename T >
T GetValueByName (PCWSTR propertyName) const
 
template<typename T >
void SetValueByName (PCWSTR propertyName, const T &value) const
 
template<typename U >
void GetValue (U index, BYTE *data, UINT32 dataSize) const
 
template<typename T , typename U >
void GetValue (U index, T *value) const
 
template<typename T , typename U >
T GetValue (U index) const
 
template<typename U >
void SetValue (U index, const BYTE *data, UINT32 dataSize) const
 
template<typename T , typename U >
void SetValue (U index, const T &value) const
 
template<typename U >
void GetPropertyName (U index, PWSTR name, UINT32 nameCount) const
 
template<typename U >
UINT32 GetPropertyNameLength (U index) const
 
template<typename U >
D2D1_PROPERTY_TYPE GetType (U index) const
 
template<typename U >
UINT32 GetValueSize (U index) const
 
template<typename U >
void GetSubProperties (U index, ID2D1Properties **subProperties) const
 
- Public Member Functions inherited from Harlinn::Common::Core::Unknown
constexpr Unknown () noexcept
 
 Unknown (IUnknown *unknown, bool addref=false) noexcept
 
 Unknown (REFIID iid, const Unknown &unknown, bool throwIfNoInterface=true)
 
 Unknown (const Unknown &other) noexcept
 
 Unknown (Unknown &&other) noexcept
 
 ~Unknown () noexcept
 
constexpr operator bool () const noexcept
 
Unknownoperator= (const Unknown &other) noexcept
 
Unknownoperator= (Unknown &&other) noexcept
 
void swap (Unknown &other) noexcept
 
void ResetPtr (IUnknown *other=nullptr, bool addRef=false) noexcept
 
Unknownoperator= (nullptr_t)
 
IUnknown * Detach ()
 
template<typename T >
requires std::is_base_of_v<Unknown, T >
T As () const
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
bool Is () const noexcept
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
ComPtr< TAs () const
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool Is () const noexcept
 This function can be used to detect if an object supports a particular COM interface derived from IUnknown.
 
template<typename T = IUnknown>
TGetInterfacePointer () const noexcept
 
bool QueryInterface (REFIID riid, void **itf) const
 Queries a COM object for a pointer to one of its interface; identifying the interface by a reference to its interface identifier (IID). If the COM object implements the interface, then it returns a pointer to that interface after calling IUnknown::AddRef on it.
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool QueryInterface (T **itf) const
 
constexpr bool operator== (const Unknown &other) const noexcept
 
constexpr bool operator!= (const Unknown &other) const noexcept
 
constexpr bool operator== (const IUnknown *other) const noexcept
 
constexpr bool operator!= (const IUnknown *other) const noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from Harlinn::Common::Core::Unknown
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const CLSID &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const wchar_t *clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const WideString &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const wchar_t *progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const WideString &progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromDll (const ModuleHandle &dll, const CLSID &clsid)
 
- Protected Attributes inherited from Harlinn::Common::Core::Unknown
IUnknown * unknown_
 

Detailed Description

Represents a set of run-time bindable and discoverable properties that allow a data-driven application to modify the state of a Direct2D effect.

Member Typedef Documentation

◆ Base

Member Function Documentation

◆ GetPropertyCount()

UINT32 Harlinn::Windows::Graphics::Properties::GetPropertyCount ( ) const
inline

Gets the number of top-level properties.

Returns
This function returns the number of custom (non-system) properties that can be accessed by the object.

This method returns the number of custom properties on the ID2D1Properties interface. System properties and sub-properties are part of a closed set, and are enumerable by iterating over this closed set.

◆ GetPropertyIndex()

UINT32 Harlinn::Windows::Graphics::Properties::GetPropertyIndex ( PCWSTR propertyName) const
inline

Gets the index corresponding to the given property name.

Parameters
propertyNameThe name of the property to retrieve.
Returns
The index of the corresponding property name.

If the property doesn't exist, then this method returns D2D1_INVALID_PROPERTY_INDEX. This reserved value will never map to a valid index, and will cause NULL or sentinel values to be returned from other parts of the property interface.

◆ GetPropertyName() [1/2]

template<typename U >
void Harlinn::Windows::Graphics::Properties::GetPropertyName ( U index,
PWSTR name,
UINT32 nameCount ) const
inline

◆ GetPropertyName() [2/2]

bool Harlinn::Windows::Graphics::Properties::GetPropertyName ( UINT32 index,
PWSTR nameBuffer,
UINT32 nameBufferSize ) const
inline

Gets the property name that corresponds to the given index.

Parameters
indexThe index of the property for which the name is being returned.
nameBufferWhen this method returns, contains the name being retrieved.
nameBufferSizeThe number of characters in the name buffer.
Returns
false if the property does not exist, otherwise true.

◆ GetPropertyNameLength() [1/2]

template<typename U >
UINT32 Harlinn::Windows::Graphics::Properties::GetPropertyNameLength ( U index) const
inline

◆ GetPropertyNameLength() [2/2]

UINT32 Harlinn::Windows::Graphics::Properties::GetPropertyNameLength ( UINT32 index) const
inline

Gets the number of characters for the given property name.

Parameters
indexThe index of the property name to retrieve.
Returns
This method returns the size in characters of the name corresponding to the given property index, or zero if the property index does not exist.

◆ GetSubProperties() [1/3]

template<typename U >
void Harlinn::Windows::Graphics::Properties::GetSubProperties ( U index,
ID2D1Properties ** subProperties ) const
inline

◆ GetSubProperties() [2/3]

Properties Harlinn::Windows::Graphics::Properties::GetSubProperties ( UINT32 index) const
inline

◆ GetSubProperties() [3/3]

bool Harlinn::Windows::Graphics::Properties::GetSubProperties ( UINT32 index,
ID2D1Properties ** subProperties ) const
inline

Retrieves the sub-properties of the given property by index.

Parameters
indexThe index of the sub-properties to be retrieved.
subPropertiesWhen this method returns, contains the address of a pointer to the sub-properties.
Returns
true if the function was able to retrieve the sub-properties of the given property by index, otherwise false.

◆ GetType() [1/2]

template<typename U >
D2D1_PROPERTY_TYPE Harlinn::Windows::Graphics::Properties::GetType ( U index) const
inline

◆ GetType() [2/2]

D2D1_PROPERTY_TYPE Harlinn::Windows::Graphics::Properties::GetType ( UINT32 index) const
inline

Gets the D2D1_PROPERTY_TYPE of the selected property.

Parameters
indexThe index of the property for which the type will be retrieved.
Returns
This method returns a D2D1_PROPERTY_TYPE-typed value for the type of the selected property.

<remakrs> If the property does not exist, the method returns D2D1_PROPERTY_TYPE_UNKNOWN.

◆ GetValue() [1/5]

template<typename T , typename U >
T Harlinn::Windows::Graphics::Properties::GetValue ( U index) const
inline

◆ GetValue() [2/5]

template<typename U >
void Harlinn::Windows::Graphics::Properties::GetValue ( U index,
BYTE * data,
UINT32 dataSize ) const
inline

◆ GetValue() [3/5]

template<typename T , typename U >
void Harlinn::Windows::Graphics::Properties::GetValue ( U index,
T * value ) const
inline

◆ GetValue() [4/5]

void Harlinn::Windows::Graphics::Properties::GetValue ( UINT32 index,
BYTE * data,
UINT32 dataSize ) const
inline

◆ GetValue() [5/5]

void Harlinn::Windows::Graphics::Properties::GetValue ( UINT32 index,
D2D1_PROPERTY_TYPE propertyType,
BYTE * data,
UINT32 dataSize ) const
inline

Gets the value of the specified property by index.

Parameters
indexThe index of the property from which the data is to be obtained.
propertyTypeThe type of the property to get.
dataWhen this method returns, contains the buffer with the data value.
dataSizeThe number of bytes in the data to be retrieved.

◆ GetValueByName() [1/4]

void Harlinn::Windows::Graphics::Properties::GetValueByName ( PCWSTR name,
BYTE * data,
UINT32 dataSize ) const
inline

◆ GetValueByName() [2/4]

template<typename T >
T Harlinn::Windows::Graphics::Properties::GetValueByName ( PCWSTR propertyName) const
inline

◆ GetValueByName() [3/4]

void Harlinn::Windows::Graphics::Properties::GetValueByName ( PCWSTR propertyName,
D2D1_PROPERTY_TYPE propertyType,
BYTE * data,
UINT32 dataSize ) const
inline

Retrieves the given property or sub-property by name. '.' is the delimiter for sub-properties.

Parameters
propertyNameThe name of the property to get.
propertyTypeThe type of the property to get.
dataWhen this method returns, contains the buffer with the data value.
dataSizeThe number of bytes in the data to be retrieved.

◆ GetValueByName() [4/4]

template<typename T >
void Harlinn::Windows::Graphics::Properties::GetValueByName ( PCWSTR propertyName,
T * value ) const
inline

◆ GetValueSize() [1/2]

template<typename U >
UINT32 Harlinn::Windows::Graphics::Properties::GetValueSize ( U index) const
inline

◆ GetValueSize() [2/2]

UINT32 Harlinn::Windows::Graphics::Properties::GetValueSize ( UINT32 index) const
inline

Gets the size of the property value in bytes, using the property index.

Parameters
indexThe index of the property.
Returns
This method returns size of the value in bytes, using the property index.

This method returns zero if index does not exist.

◆ SetValue() [1/4]

template<typename U >
void Harlinn::Windows::Graphics::Properties::SetValue ( U index,
const BYTE * data,
UINT32 dataSize ) const
inline

◆ SetValue() [2/4]

template<typename T , typename U >
void Harlinn::Windows::Graphics::Properties::SetValue ( U index,
const T & value ) const
inline

◆ SetValue() [3/4]

void Harlinn::Windows::Graphics::Properties::SetValue ( UINT32 index,
const BYTE * data,
UINT32 dataSize ) const
inline

◆ SetValue() [4/4]

void Harlinn::Windows::Graphics::Properties::SetValue ( UINT32 propertyIndex,
D2D1_PROPERTY_TYPE propertyType,
const BYTE * data,
UINT32 dataSize ) const
inline

Sets the corresponding property by index.

Parameters
propertyIndexThe index of the property to set.
propertyTypeThe type of the property to set.
dataThe data to set.
dataSizeThe number of bytes in the data to set.

◆ SetValueByName() [1/3]

void Harlinn::Windows::Graphics::Properties::SetValueByName ( PCWSTR name,
const BYTE * data,
UINT32 dataSize ) const
inline

◆ SetValueByName() [2/3]

template<typename T >
void Harlinn::Windows::Graphics::Properties::SetValueByName ( PCWSTR propertyName,
const T & value ) const
inline

◆ SetValueByName() [3/3]

void Harlinn::Windows::Graphics::Properties::SetValueByName ( PCWSTR propertyName,
D2D1_PROPERTY_TYPE propertyType,
const BYTE * data,
UINT32 dataSize ) const
inline

Sets the named property to the given value.

Parameters
propertyNameThe name of the property to set.
propertyTypeThe type of the property to set.
dataThe data to set.
dataSizeThe number of bytes in the data to set.

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