libdom
Loading...
Searching...
No Matches
html_option_element.h File Reference
#include <stdbool.h>
#include <dom/core/exceptions.h>
#include <dom/core/string.h>
#include <dom/html/html_form_element.h>

Go to the source code of this file.

Typedefs

typedef struct dom_html_option_element dom_html_option_element
 

Functions

dom_exception dom_html_option_element_get_form (dom_html_option_element *option, dom_html_form_element **form)
 
dom_exception dom_html_option_element_get_default_selected (dom_html_option_element *option, bool *default_selected)
 
dom_exception dom_html_option_element_set_default_selected (dom_html_option_element *option, bool default_selected)
 
dom_exception dom_html_option_element_get_text (dom_html_option_element *option, dom_string **text)
 
dom_exception dom_html_option_element_get_index (dom_html_option_element *option, int32_t *index)
 
dom_exception dom_html_option_element_get_disabled (dom_html_option_element *option, bool *disabled)
 
dom_exception dom_html_option_element_set_disabled (dom_html_option_element *option, bool disabled)
 
dom_exception dom_html_option_element_get_label (dom_html_option_element *option, dom_string **label)
 
dom_exception dom_html_option_element_set_label (dom_html_option_element *option, dom_string *label)
 
dom_exception dom_html_option_element_get_selected (dom_html_option_element *option, bool *selected)
 
dom_exception dom_html_option_element_set_selected (dom_html_option_element *option, bool selected)
 
dom_exception dom_html_option_element_get_value (dom_html_option_element *option, dom_string **value)
 
dom_exception dom_html_option_element_set_value (dom_html_option_element *option, dom_string *value)
 

Typedef Documentation

◆ dom_html_option_element

typedef struct dom_html_option_element dom_html_option_element

Function Documentation

◆ dom_html_option_element_get_default_selected()

dom_exception dom_html_option_element_get_default_selected ( dom_html_option_element * option,
bool * default_selected )

Get the defaultSelected property

Parameters
optionThe dom_html_option_element object
default_selectedPointer to location to receive value
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_get_disabled()

dom_exception dom_html_option_element_get_disabled ( dom_html_option_element * ele,
bool * disabled )

Get the disabled property

Parameters
eleThe dom_html_option_element object
disabledThe returned status
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ dom_html_option_element_get_form()

dom_exception dom_html_option_element_get_form ( dom_html_option_element * option,
dom_html_form_element ** form )

◆ dom_html_option_element_get_index()

dom_exception dom_html_option_element_get_index ( dom_html_option_element * option,
int32_t * index )

Obtain the index of this option in its parent

Parameters
optionThe dom_html_option_element object
indexPointer to receive zero-based index
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_get_label()

dom_exception dom_html_option_element_get_label ( dom_html_option_element * option,
dom_string ** label )

Get the label property

Parameters
optionThe dom_html_option_element object
labelPointer to location to receive label
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_get_selected()

dom_exception dom_html_option_element_get_selected ( dom_html_option_element * ele,
bool * selected )

Get the selected property

Parameters
eleThe dom_html_option_element object
selectedThe returned status
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ dom_html_option_element_get_text()

dom_exception dom_html_option_element_get_text ( dom_html_option_element * option,
dom_string ** text )

Get the text contained in the option

Parameters
optionThe dom_html_option_element object
textPointer to location to receive text
Returns
DOM_NO_ERR on success, appropriate error otherwise

◆ dom_html_option_element_get_value()

dom_exception dom_html_option_element_get_value ( dom_html_option_element * option,
dom_string ** value )

Get the value property

Parameters
optionThe dom_html_option_element object
valuePointer to location to receive property value
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_set_default_selected()

dom_exception dom_html_option_element_set_default_selected ( dom_html_option_element * option,
bool default_selected )

Set the defaultSelected property

Parameters
optionThe dom_html_option_element object
default_selectedNew value for property
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_set_disabled()

dom_exception dom_html_option_element_set_disabled ( dom_html_option_element * ele,
bool disabled )

Set the disabled property

Parameters
eleThe dom_html_option_element object
disabledThe status
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ dom_html_option_element_set_label()

dom_exception dom_html_option_element_set_label ( dom_html_option_element * option,
dom_string * label )

Set the label property

Parameters
optionThe dom_html_option_element object
labelLabel value
Returns
DOM_NO_ERR on success, appropriate error otherwise.

◆ dom_html_option_element_set_selected()

dom_exception dom_html_option_element_set_selected ( dom_html_option_element * ele,
bool selected )

Set the selected property

Parameters
eleThe dom_html_option_element object
selectedThe status
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ dom_html_option_element_set_value()

dom_exception dom_html_option_element_set_value ( dom_html_option_element * option,
dom_string * value )

Set the value property

Parameters
optionThe dom_html_option_element object
valueProperty value
Returns
DOM_NO_ERR on success, appropriate error otherwise.