API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
IController is the interface for a controller in the Model-View-Controller triad. The controller is used to interpret certain events passed to widgets. It controls the widgets' view and model based on these events.
The controller interface provides object reference counting mechanisms that allow objects to manage their own memory instances. In addition, the interface provides APIs for registering a handler with a controller.
Developers can use the IController interface to implement their own controllers, or customize already existing controllers such as TextController, widget touch controllers, etc.
General usage of the controller is as follows: - Create an instance of a controller an application by calling
ISHELL_CreateInstance() with the class ID of the controller. - For managing the instances of the controller an application would use
ICONTROLLER_AddRef() and ICONTROLLER_Release(). - The application calls ICONTROLLER_SetWidget() to associate a widget
with the controller. - The application forwards any events that need to be handled by the
controller, to the registered handler via the api call ICONTROLLER_HandleEvent().