API Reference


Brew Release
Brew MP 1.0.2
This macro initializes each of the fields of a HandlerDesc data structure. An application implementing the handler interface that wishes to provide its own event handling and memory free callback routines should call HANDLERDESC_Init() to initialize both the event handler, the storage used by the event handler, and the callback routine that will be responsible for freeing the memory used by the private storage.
  • pdesc
    Pointer to a HandlerDesc data structure, into which the macro will copy the remaining parameters.
  • ph
    Pointer to the callback function that BREW will call when processing events for this object. This routine will override the default event handler for the object, allowing an application to handle various events in a custom manner.
  • pv
    A pointer to private data allocated and managed by the caller that has registered the handler. This data pointer is passed into the custom event handler, as well as the free handler, providing each of these callbacks with access to this private storage.
  • pf
    Pointer to the callback function that BREW will call when freeing the memory associated with a handler upon release of the object implementing the handler interface. This gives the object the opportunity to release any private "deep storage" that may have been allocated by the object.
   HANDLERDESC_Init(HandlerDesc *pdesc, PFNHANDLER ph, void *pv, PFNFREEHANDLER pf);
Side Effect
  • Follow