ginga 1.0
The Ginga iTV middleware
|
A render handler class of CEF for Ginga. More...
#include <PlayerHTML.h>
Public Member Functions | |
GingaCefHandler (int width, int height, SDL_Renderer *renderer) | |
Default constructor for GingaCefHandler. | |
virtual | ~GingaCefHandler () |
Default destructor for GingaCefHandler. | |
int | getWidth () |
Return the current window width. | |
void | setWidth (int width) |
Set the current window width. | |
int | getHeight () |
Return the current window height. | |
void | setHeight (int height) |
Set the current window height. | |
SDL_Renderer * | getRenderer () |
Return the current renderer. | |
void | setRenderer (SDL_Renderer *renderer) |
Set the current renderer. | |
SDL_Texture * | getTexture () |
Return the local texture. | |
bool | GetViewRect (CefRefPtr< CefBrowser > browser, CefRect &rect) override |
Set the view rectangle. | |
void | OnPaint (CefRefPtr< CefBrowser > browser, PaintElementType type, const RectList &dirtyRects, const void *buffer, int width, int height) override |
Paint an element. | |
A render handler class of CEF for Ginga.
This class is responsible for copying the page load result to a local SDL texture.
ginga::GingaCefHandler::GingaCefHandler | ( | int | width, |
int | height, | ||
SDL_Renderer * | renderer ) |
Default constructor for GingaCefHandler.
width | The window width. |
height | The window height. |
renderer | The renderer. |
|
virtual |
Default destructor for GingaCefHandler.
int ginga::GingaCefHandler::getHeight | ( | ) |
Return the current window height.
SDL_Renderer * ginga::GingaCefHandler::getRenderer | ( | ) |
Return the current renderer.
SDL_Texture * ginga::GingaCefHandler::getTexture | ( | ) |
Return the local texture.
|
override |
Set the view rectangle.
browser | A browser instance. |
rect | The view rectangle to be set. |
"Called to retrieve the view rectangle which is relative to screen c\oordinates. Return **true** if the rectangle was provided." (copying from CEF documentation).
int ginga::GingaCefHandler::getWidth | ( | ) |
Return the current window width.
|
override |
Paint an element.
browser | A browser instance. |
type | The element type (view or widget). |
dirtyRects | Set of rectangle that need to be repainted. |
buffer | The pixel data of whole image. |
width | The image width. |
height | The image height. |
"Called when an element should be painted." (copying from CEF documentation).
void ginga::GingaCefHandler::setHeight | ( | int | height | ) |
Set the current window height.
The window height is used to create the local texture.
void ginga::GingaCefHandler::setRenderer | ( | SDL_Renderer * | renderer | ) |
Set the current renderer.
This method also create a new instance of the local texture based on the width and height values and the renderer itself.
void ginga::GingaCefHandler::setWidth | ( | int | width | ) |
Set the current window width.
The window width is used to create the local texture.