gobj_change_state()
#
Changes the current state of the given hgobj
to the specified state_name
. If the new state is different from the current state, it updates the state and publishes the EV_STATE_CHANGED
event.
Prototype
BOOL gobj_change_state(
hgobj gobj,
gobj_state_t state_name
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
The new state to transition to. |
Return Value
Returns TRUE
if the state was changed successfully, otherwise returns FALSE
.
Notes
If the new state is the same as the current state, no change occurs. If the hgobj
has a mt_state_changed
method, it will be called instead of publishing EV_STATE_CHANGED
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples