Core APIs
sgui_init
Defined in <sparklet_api.h> |
Version |
---|---|
int sgui_init(void); |
Since 1.1 |
This function initializes all the data structures and variables necessary for SGUI. It also
Initialize the Display device hardware.
Initialize the input device hardware.
Starts the event manager task.
Initializes the root window.
Calls a function to create user created SGUI applications.
PARAMETERS:
None
RETURN VALUE:
0 – Success
Example:
The below code initializes Sparklet library.
ret = sgui_init (); |
rs_exec_init
Defined in <sparklet_api.h> |
Version |
---|---|
int rs_exec_init(void); |
Since 1.1 |
This function initializes all the internal state machines and timers for further operation.
PARAMETERS:
None
RETURN VALUE:
0 - Success
Example:
The below code initializes RAPIDSEA modules.
ret = rs_exec_init (); |
sgui_process
Defined in <sparklet_api.h> |
Version |
---|---|
int sgui_process (void); |
Since 1.1 |
This function performs various operations for the SGUI library. The function needs to be called frequently as much as possible as it handles all sparklet events and drawing operations.
PARAMETERS:
None
RETURN VALUE:
0 - Success
Example:
The code below should be called in a loop continuously to perform all sparklet operations.
sgui_process(); |
rs_exec_process
Defined in <sparklet_api.h> |
Version |
---|---|
int rs_exec_process (void); |
Since 1.1 |
This function performs various operations for RAPIDSEA. The function needs to be called frequently in a while loop as it handles all state machine transitions.
PARAMETERS:
None
RETURN VALUE:
0 - Success
Example:
The code below should be called in a loop continuously to perform all sparklet operations.
ret = rs_exec_process(); |
sgui_sparklet_enable
Defined in <sparklet_api.h> |
Version |
---|---|
int sgui_sparklet_enable(int enable); |
Since 3.1 |
This function enables/disables Sparklet functionality.
PARAMETERS:
enable |
1 - Enable 0 - Disable |
RETURN VALUE:
0 - Success
-1 - Fail
Example:
The code below enables sparklet functionality.
ret =sgui_sparklet_enable(1); |
sgui_force_pending_transition_completion
Defined in <sparklet_api.h> |
Version |
---|---|
void sgui_force_pending_transition_completion (void); |
Since 3.1 |
This function forces all pending sparklet transitions and animations to complete. This is used when the Sparklet is being shutdown gracefully.
PARAMETERS:
None.
RETURN VALUE:
None.
Example:
The below code forces pending sparklet transitions to completion.
sgui_force_pending_transition_completion (); |
sgui_reset_force_transition_completion
Defined in <sparklet_api.h> |
Version |
---|---|
void sgui_reset_force_transition_completion (void); |
Since 3.1 |
This function exits the force completion state to normal operation. Must be called when the Sparklet is restarted after being stopped.
PARAMETERS:
None.
RETURN VALUE:
None.
Example:
The below code reset Sparklet transition completion.
sgui_reset_force_transition_completion (); |