home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xbltwnd.h < prev    next >
Text File  |  1997-03-30  |  2KB  |  46 lines

  1. #if !defined( __XBLITTERWINDOW_HPP__ )
  2. #define __XBLITTERWINDOW_HPP__
  3.  
  4. #include <xheaders.h>
  5. #include "xfrmwnd.h"
  6. #include "xpal.h"
  7. #include "xblitter.h"
  8.  
  9.  
  10. // blitting type
  11. #define BLT_DIRTYRECT   0xff00  // dirty rectangles will be blitted; window mustn't be sizable
  12. #define BLT_NODIRTYRECT 0xff01  // the whole buffer will be blitted
  13.  
  14.  
  15. class _export_ XBlitterWindow : public XFrameWindow
  16. {
  17.         friend MRESULT EXPENTRY NewWndProc( HWND, ULONG, MPARAM, MPARAM );
  18.  
  19.         private:
  20.                 PFNWP                   pOldWndProc;            // pointer to the old window proc
  21.  
  22.                 XBlitter*               pBlitter;               // pointer to the blitter object
  23.                 ULONG                   flBlitting;             // blitting method
  24.  
  25.                 inline void Activate( void )    { pBlitter->pPalette->Enable(); }
  26.                 inline void Deactivate( void )  { pBlitter->pPalette->Disable(); }
  27.  
  28.         public:
  29.                 // ctor / dtor
  30.                          XBlitterWindow( const XResource * resource,
  31.                                          const char * title,
  32.                                                XBlitter* pBlitter,
  33.                                          const ULONG     blitting,
  34.                                          const ULONG createstyle = defaultStyle,
  35.                                          const XRect * rec = NULL,
  36.                                          const XFrameWindow * parent=NULL,
  37.                                          const BOOL buildFromResources = FALSE,
  38.                                          const BOOL animate = FALSE                 );
  39.                 virtual ~XBlitterWindow()       {}
  40.  
  41.                 // get a pointer to the blitter object
  42.                 XBlitter* GetBlitter( void )    { return pBlitter; }
  43. };
  44.  
  45. #endif
  46.