EasyGUI  v0.1
Platform independent GUI Library
Callback processing

Callback based functions. More...

Functions

uint8_t gui_widget_processdefaultcallback (GUI_HANDLE_p h, GUI_WC_t ctrl, GUI_WIDGET_PARAM_t *param, GUI_WIDGET_RESULT_t *result)
 Widget callback function for all events. More...
 
uint8_t gui_widget_setcallback (GUI_HANDLE_p h, GUI_WIDGET_CALLBACK_t callback)
 Set callback function to widget. More...
 
uint8_t gui_widget_callback (GUI_HANDLE_p h, GUI_WC_t ctrl, GUI_WIDGET_PARAM_t *param, GUI_WIDGET_RESULT_t *result)
 Widget callback function for all events. More...
 

Detailed Description

Callback based functions.

Function Documentation

uint8_t gui_widget_callback ( GUI_HANDLE_p  h,
GUI_WC_t  ctrl,
GUI_WIDGET_PARAM_t param,
GUI_WIDGET_RESULT_t result 
)

Widget callback function for all events.

Note
Called from user outside callback. For calling default callback inside custom callback for widget, use gui_widget_processdefaultcallback instead. If called from inside widget callback, it may result in recursive calls.
Parameters
[in,out]hWidget handle where callback occurred
[in]ctrlControl command which happened for widget. This parameter can be a value of GUI_WC_t enumeration
[in]*paramPointer to optional input data for command. Check GUI_WC_t enumeration for more informations
[out]*resultPointer to optional result value. Check GUI_WC_t enumeration for more informations
Return values
1Command has been processed
0Command has not been processed
See also
gui_widget_setcallback
uint8_t gui_widget_processdefaultcallback ( GUI_HANDLE_p  h,
GUI_WC_t  ctrl,
GUI_WIDGET_PARAM_t param,
GUI_WIDGET_RESULT_t result 
)

Widget callback function for all events.

Note
Called either from GUI stack or from widget itself to notify user
Call this function inside custom callback widget function for unhandled events It will automatically call required function according to input widget
Parameters
[in,out]hWidget handle where callback occurred
[in]ctrlControl command which happened for widget. This parameter can be a value of GUI_WC_t enumeration
[in]*paramPointer to optional input data for command. Check GUI_WC_t enumeration for more informations
[out]*resultPointer to optional result value. Check GUI_WC_t enumeration for more informations
Return values
1Command has been processed
0Command has not been processed
uint8_t gui_widget_setcallback ( GUI_HANDLE_p  h,
GUI_WIDGET_CALLBACK_t  callback 
)

Set callback function to widget.

Parameters
[in,out]hWidget handle object
[in]callbackCallback function for widget
Return values
1Callback was set ok
1Callback was not set
See also
gui_widget_processdefaultcallback, gui_widget_callback