Enumeration properties represent a feature whose value is selected from a list of named entries.
More...
|
bool | ic4_prop_enum_get_entries (struct IC4_PROPERTY *prop, struct IC4_PROPERTY_LIST **ppList) |
| Returns the list of entries in this enumeration property.
|
|
bool | ic4_prop_enum_find_entry_by_name (struct IC4_PROPERTY *prop, const char *entry_name, struct IC4_PROPERTY **ppEntry) |
| Finds the enumeration entry with a given name in this enumeration property.
|
|
bool | ic4_prop_enum_find_entry_by_value (struct IC4_PROPERTY *prop, int64_t entry_value, struct IC4_PROPERTY **ppEntry) |
| Finds the enumeration entry with a given value in this enumeration property.
|
|
bool | ic4_prop_enum_set_value (struct IC4_PROPERTY *prop, const char *entry_name) |
| Sets the enumeration's selected entry by name.
|
|
const char * | ic4_prop_enum_get_value (struct IC4_PROPERTY *prop) |
| Returns the name of the currently selected entry of the enumeration.
|
|
bool | ic4_prop_enum_set_selected_entry (struct IC4_PROPERTY *prop, struct IC4_PROPERTY *entry) |
| Sets the enumeration's selected entry.
|
|
bool | ic4_prop_enum_get_selected_entry (struct IC4_PROPERTY *prop, struct IC4_PROPERTY **ppEntry) |
| Returns the currently selected entry of this enumeration property.
|
|
bool | ic4_prop_enum_set_int_value (struct IC4_PROPERTY *prop, int64_t entry_value) |
| Selects the currently selected entry of this enumeration property by specifying the entry's value.
|
|
bool | ic4_prop_enum_get_int_value (struct IC4_PROPERTY *prop, int64_t *pValue) |
| Returns the value of the currently selected entry of an enumeration property.
|
|
bool | ic4_prop_enumentry_get_int_value (struct IC4_PROPERTY *prop, int64_t *pValue) |
| Returns the value of an enumeration entry.
|
|
Enumeration properties represent a feature whose value is selected from a list of named entries.
Common examples for an enumeration properties are PixelFormat
, TriggerMode
or ExposureAuto
.
The value of an enumeration property can be get or set by both a enumeration entry's name or value.
Enumeration entries are represented by IC4_PROPERTY objects; a call to ic4_prop_enum_get_entries() returns the list of possible enumeration entries as a IC4_PROPERTY_LIST.
◆ ic4_prop_enum_find_entry_by_name()
bool ic4_prop_enum_find_entry_by_name |
( |
struct IC4_PROPERTY * |
prop, |
|
|
const char * |
entry_name, |
|
|
struct IC4_PROPERTY ** |
ppEntry |
|
) |
| |
Finds the enumeration entry with a given name in this enumeration property.
- Parameters
-
[in] | prop | An enumeration property |
[in] | entry_name | The name of one of this enumeration property's enumeration entries |
[out] | ppEntry | A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref(). |
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- See also
- ic4_prop_enum_find_entry_by_value
◆ ic4_prop_enum_find_entry_by_value()
bool ic4_prop_enum_find_entry_by_value |
( |
struct IC4_PROPERTY * |
prop, |
|
|
int64_t |
entry_value, |
|
|
struct IC4_PROPERTY ** |
ppEntry |
|
) |
| |
Finds the enumeration entry with a given value in this enumeration property.
- Parameters
-
[in] | prop | An enumeration property |
[in] | entry_value | The value of one of this enumeration property's enumeration entries |
[out] | ppEntry | A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref(). |
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- See also
- ic4_prop_enum_find_entry_by_name
◆ ic4_prop_enum_get_entries()
Returns the list of entries in this enumeration property.
- Parameters
-
[in] | prop | An enumeration property |
[out] | ppList | A pointer to a property list receiving the list of enumeration entries.
When the property list is no longer required, release the object reference using ic4_proplist_unref(). |
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
◆ ic4_prop_enum_get_int_value()
bool ic4_prop_enum_get_int_value |
( |
struct IC4_PROPERTY * |
prop, |
|
|
int64_t * |
pValue |
|
) |
| |
◆ ic4_prop_enum_get_selected_entry()
Returns the currently selected entry of this enumeration property.
- Parameters
-
[in] | prop | An enumeration property |
[out] | ppEntry | A pointer to a property receiving the currently selected enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref(). |
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- See also
- ic4_prop_enum_get_int_value
◆ ic4_prop_enum_get_value()
const char * ic4_prop_enum_get_value |
( |
struct IC4_PROPERTY * |
prop | ) |
|
Returns the name of the currently selected entry of the enumeration.
- Parameters
-
prop | An enumeration property |
- Returns
- The name of the enumeration's currently selected entry, or
NULL
in case of an error.
Use ic4_get_last_error() to query error information.
The memory pointed to by the return value is valid at least as the property object exists, or until the next call to ic4_prop_enum_get_value
on this enumeration.
◆ ic4_prop_enum_set_int_value()
bool ic4_prop_enum_set_int_value |
( |
struct IC4_PROPERTY * |
prop, |
|
|
int64_t |
entry_value |
|
) |
| |
◆ ic4_prop_enum_set_selected_entry()
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value |
( |
struct IC4_PROPERTY * |
prop, |
|
|
const char * |
entry_name |
|
) |
| |
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value |
( |
struct IC4_PROPERTY * |
prop, |
|
|
int64_t * |
pValue |
|
) |
| |
Returns the value of an enumeration entry.
- Parameters
-
[in] | prop | An enumeration entry |
[out] | pValue | A pointer to a double receiving the value of the enumeration entry |
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- See also
- ic4_prop_enum_get_entries