Panda3D
 All Classes Functions Variables Enumerations
awWebCore.cxx
1 // Filename: awWebCore.cxx
2 // Created by: rurbino (12Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_awesomium.h"
16 #include "awWebCore.h"
17 #include "WebCore.h"
18 
19 TypeHandle AwWebCore::_type_handle;
20 
21 AwWebCore::
22 AwWebCore(AwWebCore::LogLevel level, bool enablePlugins , AwWebCore::PixelFormat pixelFormat)
23 #ifndef CPPPARSER
24 :
25  WebCore(static_cast<Awesomium::LogLevel>(level), enablePlugins, static_cast<Awesomium::PixelFormat>(pixelFormat))
26 #endif
27  {
28  awesomium_cat.info() << "constructing webcore\n";
29 }
30 
31 AwWebCore::
32 ~AwWebCore() {
33  awesomium_cat.info() << "destructor webcore\n";
34 }
35 
36 Awesomium::WebCore& AwWebCore::
37 Get() {
38  return WebCore::Get();
39 }
40 
41 Awesomium::WebCore* AwWebCore::
42 GetPointer() {
43  return WebCore::GetPointer();
44 }
45 
46 AwWebView * AwWebCore::
47 createWebView(int width, int height, bool isTransparent , bool enableAsyncRendering , int maxAsyncRenderPerSec ) {
48  Awesomium::WebView * newView = WebCore::createWebView(width, height, isTransparent, enableAsyncRendering, maxAsyncRenderPerSec);
49  AwWebView * result = new AwWebView(newView);
50  return result;
51 }
52 
53 AwWebCore::PixelFormat AwWebCore::
54 getPixelFormat() const {
55  return ( static_cast<AwWebCore::PixelFormat>( WebCore::getPixelFormat()) );
56 }
57 
PixelFormat
An enumeration of the two output pixel formats that WebView::render will use.
Definition: awWebCore.h:43
Thin bindings, wraps a WebView * returned from WebCore.createWebView.
Definition: awWebView.h:29
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
LogLevel
An enumeration of the three verbosity settings for the Awesomium Log.
Definition: awWebCore.h:33