Awesomium  1.7.0 RC3
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Awesomium::Surface Class Reference

This interface can be used to provide your own Surface implementation to directly handle paint and pixel-scroll events for all offscreen WebViews. More...

#include <Surface.h>

Inheritance diagram for Awesomium::Surface:
Awesomium::BitmapSurface

List of all members.

Public Member Functions

virtual void Paint (unsigned char *src_buffer, int src_row_span, const Awesomium::Rect &src_rect, const Awesomium::Rect &dest_rect)=0
virtual void Scroll (int dx, int dy, const Awesomium::Rect &clip_rect)=0

Detailed Description

This interface can be used to provide your own Surface implementation to directly handle paint and pixel-scroll events for all offscreen WebViews.

You should use this by defining your own SurfaceFactory that creates your specific Surface implementation.

Note:
See WebView::surface

Member Function Documentation

virtual void Awesomium::Surface::Paint ( unsigned char *  src_buffer,
int  src_row_span,
const Awesomium::Rect src_rect,
const Awesomium::Rect dest_rect 
)
pure virtual

This event is called whenever the WebView wants to paint a certain section of the Surface with a block of pixels. It is your responsibility to copy src_buffer to the location in this Surface specified by dest_rect.

Parameters:
src_bufferA pointer to a block of pixels in 32-bit BGRA format. Size of the buffer is src_row_span * src_rect.height. Beware that src_buffer points to the beginning of the transport buffer, you should use src_rect to determine the offset to begin copying pixels from.
src_row_spanThe number of bytes of each row. (Usually src_rect.width * 4)
src_rectThe dimensions of the region of src_buffer to copy from. May have a non-zero origin.
dest_rectThe location to copy src_buffer to. Always has same dimensions as src_rect but may have different origin (which specifies the offset of the section to copy to).

Implemented in Awesomium::BitmapSurface.

virtual void Awesomium::Surface::Scroll ( int  dx,
int  dy,
const Awesomium::Rect clip_rect 
)
pure virtual

This event is called whenever the WebView wants to 'scroll' an existing section of the Surface by a certain offset. It your responsibility to translate the pixels within the specified clipping rectangle by the specified offset.

Parameters:
dxThe amount of pixels to offset vertically.
dyThe amount of pixels to offset vertically.
clip_rectThe rectangle that this operation should be clipped to.

Implemented in Awesomium::BitmapSurface.


The documentation for this class was generated from the following file: