Ginga
0.13.6.2086-83aa
The 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. More... | |
virtual | ~GingaCefHandler () |
Default destructor for GingaCefHandler. More... | |
int | getWidth () |
Return the current window width. More... | |
void | setWidth (int width) |
Set the current window width. More... | |
int | getHeight () |
Return the current window height. More... | |
void | setHeight (int height) |
Set the current window height. More... | |
SDL_Renderer * | getRenderer () |
Return the current renderer. More... | |
void | setRenderer (SDL_Renderer *renderer) |
Set the current renderer. More... | |
SDL_Texture * | getTexture () |
Return the local texture. More... | |
bool | GetViewRect (CefRefPtr< CefBrowser > browser, CefRect &rect) override |
Set the view rectangle. More... | |
void | OnPaint (CefRefPtr< CefBrowser > browser, PaintElementType type, const RectList &dirtyRects, const void *buffer, int width, int height) override |
Paint an element. More... | |
Private Attributes | |
int | _width |
Keep the current window width. | |
int | _height |
Keep the current window height. | |
SDL_Texture * | _texture |
Keep the local texture. | |
SDL_Renderer * | _renderer |
Keep the current renderer. | |
A render handler class of CEF for Ginga.
This class is responsible for copying the page load result to a local SDL texture.
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 GingaCefHandler::getHeight | ( | ) |
Return the current window height.
SDL_Renderer * GingaCefHandler::getRenderer | ( | ) |
Return the current renderer.
SDL_Texture * 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 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 GingaCefHandler::setHeight | ( | int | height | ) |
Set the current window height.
The window height is used to create the local texture.
void 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 GingaCefHandler::setWidth | ( | int | width | ) |
Set the current window width.
The window width is used to create the local texture.