Developer

API Reference

DrawHandlerDesc

Brew Release
Brew MP 1.0.2
See Also
- PFNDRAWHANDLER
- PFNFREEHANDLER
- IDrawDecorator_SetDraw()
Description
This data type defines the callback handlers a draw decorator will use to draw itself and -- when the draw decorator is finally released -- free any private storage allocated by the draw decorator.
Members
  • pfn:      Pointer to the callback function that BREW will call when drawing
                 the decorator.  This routine will override the default drawing routine
                 for the decorator, allowing an application to apply a custom rendering
                 technique to the widget wrapped by the draw decorator object.
  • pCxt:     A pointer to private data allocated and managed by the caller that
                 has registered the draw handler with the draw decorator.  This data
                 pointer is passed into the draw handler, as well as the free handler,
                 providing each of these callbacks with access to this private storage.
  • pfnFree:  Pointer to the callback function that BREW will call when freeing the
                 memory associated with a draw decorator upon releasing the object.
                 This gives the draw decorator the opportunity to release any private
                 "deep" storage that may have been allocated by the object.
    
Definition
   typedef struct {
      PFNDRAWHANDLER    pfn;
      void             *pCxt;
      PFNFREEHANDLER    pfnFree;
   } DrawHandlerDesc;
Comment
A pointer to a DrawHandlerDesc data structure is passed to IDrawDecorator_SetDraw() to register the callbacks a draw decorator will use to perform custom drawing and memory free routines.
  • Follow