Developer

API Reference

IWidget_GetUserData()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IWidget IWidget_SetUserData
Description
This function is used to retrieve user data that are stored as integer value, copying the value into the 'pnUserData' pointer passed to the function as a parameter. The function will return AEE_SUCCESS or AEE_EFAILED depending on whether or not the widget was able to retrieve user data.
Parameters
  • pif
    []:
    [in] Pointer to the IWidget interface object.
  • pnUserData
    []:
    [out] A pointer to a int into which the widget will copy the value of the requested user data. For example, from application, an element ID can be associated against each widget using this user data. This Element ID is stored as int and IWidget_GetUserData() would pass back a pointer to int, with that pointer pointing to the element ID.
Interface
Prototype
   int IWidget_GetUserData(IWidget *pif, int *pnUserData);
Return
AEE_SUCCESS : The function was able to successfully retrieve user data. AEE_EFAILED : If the user data could not be retrieved.
Side Effect
None
Comment
If application wants to store struct as user data, address of struct will be stored as integer in user data of widget and IWidget_GetUserData() would pass back the address. Application has to cast/dereference the pointer to use it as struct.
  • Follow