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


API Reference


Brew Release
Brew MP 1.0.2
See Also
- IDecorator Interface - IDrawDecorator Interface - IWidget Interface
IHandler is an abstract interface meant to be a base from which more complex object implementations are based. Implementations of the handler interface include the decorator interface, the draw decorator interface, and the widget interface. A handler is, essentially, a mechanism that provides customized event handling to another object. An application could, for example, provide a customized event handler to a container object for the purpose of handling certain events in very specific ways -- for example, handling (or even ignoring) attempts to set various widget properties in a special manner.
Objects implementing the handler interface must provide their own implementation of each function defined by the interface.
Supported Events: The base handler interface may process any BREW event, as required by the object implementing the handler interface.
While the usage below is somewhat tied to the derived IWidget instance because of the event that is being used, it would of course be possible to do this with any derived interface/class of IHandler.
   IWidget* piw = ;
   IHandler* piHandler = NULL;
   int nErr = IWidget_QueryInterface(piw, AEEIID_IHandler, (void**)&piHandler);
   if (AEE_SUCCESS == nErr) {
      piHandler = NULL;