Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@@ -9,12 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c244fabd0671d80878beec9fcaa13b0251048f50$
//
#include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefBoxLayoutCToCpp::SetFlexForView(CefRefPtr<CefView> view, int flex) {
@@ -30,9 +31,7 @@ void CefBoxLayoutCToCpp::SetFlexForView(CefRefPtr<CefView> view, int flex) {
return;
// Execute
_struct->set_flex_for_view(_struct,
CefViewCToCpp::Unwrap(view),
flex);
_struct->set_flex_for_view(_struct, CefViewCToCpp::Unwrap(view), flex);
}
void CefBoxLayoutCToCpp::ClearFlexForView(CefRefPtr<CefView> view) {
@@ -48,8 +47,7 @@ void CefBoxLayoutCToCpp::ClearFlexForView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->clear_flex_for_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->clear_flex_for_view(_struct, CefViewCToCpp::Unwrap(view));
}
CefRefPtr<CefBoxLayout> CefBoxLayoutCToCpp::AsBoxLayout() {
@@ -91,26 +89,30 @@ bool CefBoxLayoutCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefBoxLayoutCToCpp::CefBoxLayoutCToCpp() {
}
CefBoxLayoutCToCpp::CefBoxLayoutCToCpp() {}
template<> cef_box_layout_t* CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout, cef_box_layout_t>::UnwrapDerived(CefWrapperType type,
CefBoxLayout* c) {
template <>
cef_box_layout_t*
CefCToCppRefCounted<CefBoxLayoutCToCpp, CefBoxLayout, cef_box_layout_t>::
UnwrapDerived(CefWrapperType type, CefBoxLayout* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout, cef_box_layout_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout,
cef_box_layout_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefBoxLayoutCToCpp, CefBoxLayout,
cef_box_layout_t>::kWrapperType = WT_BOX_LAYOUT;
template <>
CefWrapperType CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout,
cef_box_layout_t>::kWrapperType =
WT_BOX_LAYOUT;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=101c51d45d4911ff0497fe2e32a75869ff262361$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BOX_LAYOUT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BOX_LAYOUT_CTOCPP_H_
@@ -18,17 +20,17 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_box_layout.h"
#include "include/capi/views/cef_box_layout_capi.h"
#include "include/views/cef_view.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/views/cef_box_layout.h"
#include "include/views/cef_view.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefBoxLayoutCToCpp
: public CefCToCppRefCounted<CefBoxLayoutCToCpp, CefBoxLayout,
cef_box_layout_t> {
class CefBoxLayoutCToCpp : public CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout,
cef_box_layout_t> {
public:
CefBoxLayoutCToCpp();

View File

@@ -9,25 +9,27 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=db4176c64eb45165a67d1495aa9222169c6f4c89$
//
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/client_cpptoc.h"
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
#include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefBrowserView> CefBrowserView::CreateBrowserView(
CefRefPtr<CefClient> client, const CefString& url,
CefRefPtr<CefClient> client,
const CefString& url,
const CefBrowserSettings& settings,
CefRefPtr<CefRequestContext> request_context,
CefRefPtr<CefBrowserViewDelegate> delegate) {
@@ -37,9 +39,7 @@ CefRefPtr<CefBrowserView> CefBrowserView::CreateBrowserView(
// Execute
cef_browser_view_t* _retval = cef_browser_view_create(
CefClientCppToC::Wrap(client),
url.GetStruct(),
&settings,
CefClientCppToC::Wrap(client), url.GetStruct(), &settings,
CefRequestContextCToCpp::Unwrap(request_context),
CefBrowserViewDelegateCppToC::Wrap(delegate));
@@ -57,14 +57,13 @@ CefRefPtr<CefBrowserView> CefBrowserView::GetForBrowser(
return NULL;
// Execute
cef_browser_view_t* _retval = cef_browser_view_get_for_browser(
CefBrowserCToCpp::Unwrap(browser));
cef_browser_view_t* _retval =
cef_browser_view_get_for_browser(CefBrowserCToCpp::Unwrap(browser));
// Return type: refptr_same
return CefBrowserViewCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefBrowser> CefBrowserViewCToCpp::GetBrowser() {
@@ -89,8 +88,7 @@ void CefBrowserViewCToCpp::SetPreferAccelerators(bool prefer_accelerators) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_prefer_accelerators(_struct,
prefer_accelerators);
_struct->set_prefer_accelerators(_struct, prefer_accelerators);
}
CefRefPtr<CefBrowserView> CefBrowserViewCToCpp::AsBrowserView() {
@@ -187,8 +185,7 @@ CefString CefBrowserViewCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -207,7 +204,7 @@ bool CefBrowserViewCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::IsAttached() {
@@ -221,7 +218,7 @@ bool CefBrowserViewCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -237,11 +234,10 @@ bool CefBrowserViewCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefBrowserViewCToCpp::GetDelegate() {
@@ -294,8 +290,7 @@ void CefBrowserViewCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefBrowserViewCToCpp::GetGroupID() {
@@ -320,8 +315,7 @@ void CefBrowserViewCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefBrowserViewCToCpp::GetParentView() {
@@ -346,8 +340,7 @@ CefRefPtr<CefView> CefBrowserViewCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -361,8 +354,7 @@ void CefBrowserViewCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefBrowserViewCToCpp::GetBounds() {
@@ -401,8 +393,7 @@ void CefBrowserViewCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefBrowserViewCToCpp::GetSize() {
@@ -427,8 +418,7 @@ void CefBrowserViewCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefBrowserViewCToCpp::GetPosition() {
@@ -506,8 +496,7 @@ int CefBrowserViewCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -532,8 +521,7 @@ void CefBrowserViewCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefBrowserViewCToCpp::IsVisible() {
@@ -547,7 +535,7 @@ bool CefBrowserViewCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::IsDrawn() {
@@ -561,7 +549,7 @@ bool CefBrowserViewCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefBrowserViewCToCpp::SetEnabled(bool enabled) {
@@ -572,8 +560,7 @@ void CefBrowserViewCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefBrowserViewCToCpp::IsEnabled() {
@@ -587,7 +574,7 @@ bool CefBrowserViewCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefBrowserViewCToCpp::SetFocusable(bool focusable) {
@@ -598,8 +585,7 @@ void CefBrowserViewCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefBrowserViewCToCpp::IsFocusable() {
@@ -613,7 +599,7 @@ bool CefBrowserViewCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::IsAccessibilityFocusable() {
@@ -627,7 +613,7 @@ bool CefBrowserViewCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefBrowserViewCToCpp::RequestFocus() {
@@ -649,8 +635,7 @@ void CefBrowserViewCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefBrowserViewCToCpp::GetBackgroundColor() {
@@ -675,11 +660,10 @@ bool CefBrowserViewCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -690,11 +674,10 @@ bool CefBrowserViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -705,11 +688,10 @@ bool CefBrowserViewCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -720,15 +702,14 @@ bool CefBrowserViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -741,16 +722,15 @@ bool CefBrowserViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefBrowserViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -763,31 +743,34 @@ bool CefBrowserViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefBrowserViewCToCpp::CefBrowserViewCToCpp() {
}
CefBrowserViewCToCpp::CefBrowserViewCToCpp() {}
template<> cef_browser_view_t* CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView, cef_browser_view_t>::UnwrapDerived(CefWrapperType type,
CefBrowserView* c) {
template <>
cef_browser_view_t*
CefCToCppRefCounted<CefBrowserViewCToCpp, CefBrowserView, cef_browser_view_t>::
UnwrapDerived(CefWrapperType type, CefBrowserView* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView, cef_browser_view_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView,
cef_browser_view_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView, cef_browser_view_t>::kWrapperType = WT_BROWSER_VIEW;
template <>
CefWrapperType CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView,
cef_browser_view_t>::kWrapperType =
WT_BROWSER_VIEW;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1e7369596ef3c39e73d8349601e0b5bfdb24d1ef$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_
@@ -18,15 +20,15 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_browser_view.h"
#include "include/capi/views/cef_browser_view_capi.h"
#include "include/views/cef_browser_view.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefBrowserViewCToCpp
: public CefCToCppRefCounted<CefBrowserViewCToCpp, CefBrowserView,
cef_browser_view_t> {
class CefBrowserViewCToCpp : public CefCToCppRefCounted<CefBrowserViewCToCpp,
CefBrowserView,
cef_browser_view_t> {
public:
CefBrowserViewCToCpp();

View File

@@ -9,18 +9,20 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0eb6f0608c15cba18640c52aa8a3fd0ed73cce15$
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/client_ctocpp.h"
#include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefBrowserViewDelegateCToCpp::OnBrowserCreated(
CefRefPtr<CefBrowserView> browser_view, CefRefPtr<CefBrowser> browser) {
CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowser> browser) {
cef_browser_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_browser_created))
return;
@@ -37,13 +39,13 @@ void CefBrowserViewDelegateCToCpp::OnBrowserCreated(
return;
// Execute
_struct->on_browser_created(_struct,
CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserCppToC::Wrap(browser));
_struct->on_browser_created(_struct, CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserCppToC::Wrap(browser));
}
void CefBrowserViewDelegateCToCpp::OnBrowserDestroyed(
CefRefPtr<CefBrowserView> browser_view, CefRefPtr<CefBrowser> browser) {
CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowser> browser) {
cef_browser_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_browser_destroyed))
return;
@@ -61,13 +63,16 @@ void CefBrowserViewDelegateCToCpp::OnBrowserDestroyed(
// Execute
_struct->on_browser_destroyed(_struct,
CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserCppToC::Wrap(browser));
CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserCppToC::Wrap(browser));
}
CefRefPtr<CefBrowserViewDelegate> CefBrowserViewDelegateCToCpp::GetDelegateForPopupBrowserView(
CefRefPtr<CefBrowserView> browser_view, const CefBrowserSettings& settings,
CefRefPtr<CefClient> client, bool is_devtools) {
CefRefPtr<CefBrowserViewDelegate>
CefBrowserViewDelegateCToCpp::GetDelegateForPopupBrowserView(
CefRefPtr<CefBrowserView> browser_view,
const CefBrowserSettings& settings,
CefRefPtr<CefClient> client,
bool is_devtools) {
cef_browser_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_delegate_for_popup_browser_view))
return NULL;
@@ -85,11 +90,9 @@ CefRefPtr<CefBrowserViewDelegate> CefBrowserViewDelegateCToCpp::GetDelegateForPo
// Execute
cef_browser_view_delegate_t* _retval =
_struct->get_delegate_for_popup_browser_view(_struct,
CefBrowserViewCppToC::Wrap(browser_view),
&settings,
CefClientCToCpp::Unwrap(client),
is_devtools);
_struct->get_delegate_for_popup_browser_view(
_struct, CefBrowserViewCppToC::Wrap(browser_view), &settings,
CefClientCToCpp::Unwrap(client), is_devtools);
// Return type: refptr_same
return CefBrowserViewDelegateCToCpp::Wrap(_retval);
@@ -97,7 +100,8 @@ CefRefPtr<CefBrowserViewDelegate> CefBrowserViewDelegateCToCpp::GetDelegateForPo
bool CefBrowserViewDelegateCToCpp::OnPopupBrowserViewCreated(
CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowserView> popup_browser_view, bool is_devtools) {
CefRefPtr<CefBrowserView> popup_browser_view,
bool is_devtools) {
cef_browser_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_popup_browser_view_created))
return false;
@@ -114,19 +118,18 @@ bool CefBrowserViewDelegateCToCpp::OnPopupBrowserViewCreated(
return false;
// Execute
int _retval = _struct->on_popup_browser_view_created(_struct,
CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserViewCppToC::Wrap(popup_browser_view),
is_devtools);
int _retval = _struct->on_popup_browser_view_created(
_struct, CefBrowserViewCppToC::Wrap(browser_view),
CefBrowserViewCppToC::Wrap(popup_browser_view), is_devtools);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefSize CefBrowserViewDelegateCToCpp::GetPreferredSize(
CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -138,16 +141,16 @@ CefSize CefBrowserViewDelegateCToCpp::GetPreferredSize(
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefBrowserViewDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -159,16 +162,16 @@ CefSize CefBrowserViewDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefBrowserViewDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -180,17 +183,17 @@ CefSize CefBrowserViewDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefBrowserViewDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -202,18 +205,19 @@ int CefBrowserViewDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefBrowserViewDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
void CefBrowserViewDelegateCToCpp::OnParentViewChanged(
CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -229,16 +233,16 @@ void CefBrowserViewDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefBrowserViewDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
void CefBrowserViewDelegateCToCpp::OnChildViewChanged(
CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -254,15 +258,13 @@ void CefBrowserViewDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefBrowserViewDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -274,13 +276,12 @@ void CefBrowserViewDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefBrowserViewDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -292,28 +293,33 @@ void CefBrowserViewDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefBrowserViewDelegateCToCpp::CefBrowserViewDelegateCToCpp() {
}
CefBrowserViewDelegateCToCpp::CefBrowserViewDelegateCToCpp() {}
template<> cef_browser_view_delegate_t* CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate, cef_browser_view_delegate_t>::UnwrapDerived(
CefWrapperType type, CefBrowserViewDelegate* c) {
template <>
cef_browser_view_delegate_t* CefCToCppRefCounted<
CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate,
cef_browser_view_delegate_t>::UnwrapDerived(CefWrapperType type,
CefBrowserViewDelegate* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate, cef_browser_view_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate,
cef_browser_view_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate, cef_browser_view_delegate_t>::kWrapperType =
template <>
CefWrapperType CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate,
cef_browser_view_delegate_t>::kWrapperType =
WT_BROWSER_VIEW_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=259b6a14e0f63f28e71cea91c1899a57e4478d01$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_DELEGATE_CTOCPP_H_
@@ -18,44 +20,48 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_browser_view_delegate.h"
#include "include/capi/cef_browser_capi.h"
#include "include/capi/views/cef_browser_view_capi.h"
#include "include/capi/views/cef_browser_view_delegate_capi.h"
#include "include/cef_browser.h"
#include "include/capi/cef_browser_capi.h"
#include "include/views/cef_browser_view.h"
#include "include/capi/views/cef_browser_view_capi.h"
#include "include/views/cef_browser_view_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefBrowserViewDelegateCToCpp
: public CefCToCppRefCounted<CefBrowserViewDelegateCToCpp,
CefBrowserViewDelegate, cef_browser_view_delegate_t> {
CefBrowserViewDelegate,
cef_browser_view_delegate_t> {
public:
CefBrowserViewDelegateCToCpp();
// CefBrowserViewDelegate methods.
void OnBrowserCreated(CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowser> browser) override;
CefRefPtr<CefBrowser> browser) override;
void OnBrowserDestroyed(CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowser> browser) override;
CefRefPtr<CefBrowser> browser) override;
CefRefPtr<CefBrowserViewDelegate> GetDelegateForPopupBrowserView(
CefRefPtr<CefBrowserView> browser_view,
const CefBrowserSettings& settings, CefRefPtr<CefClient> client,
const CefBrowserSettings& settings,
CefRefPtr<CefClient> client,
bool is_devtools) override;
bool OnPopupBrowserViewCreated(CefRefPtr<CefBrowserView> browser_view,
CefRefPtr<CefBrowserView> popup_browser_view,
bool is_devtools) override;
CefRefPtr<CefBrowserView> popup_browser_view,
bool is_devtools) override;
// CefViewDelegate methods.
CefSize GetPreferredSize(CefRefPtr<CefView> view) override;
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=95094867efa267a8462c40596e749539670db449$
//
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
@@ -21,7 +23,6 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefLabelButton> CefButtonCToCpp::AsLabelButton() {
@@ -46,8 +47,7 @@ void CefButtonCToCpp::SetState(cef_button_state_t state) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_state(_struct,
state);
_struct->set_state(_struct, state);
}
cef_button_state_t CefButtonCToCpp::GetState() {
@@ -72,8 +72,7 @@ void CefButtonCToCpp::SetInkDropEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_ink_drop_enabled(_struct,
enabled);
_struct->set_ink_drop_enabled(_struct, enabled);
}
void CefButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
@@ -89,8 +88,7 @@ void CefButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
return;
// Execute
_struct->set_tooltip_text(_struct,
tooltip_text.GetStruct());
_struct->set_tooltip_text(_struct, tooltip_text.GetStruct());
}
void CefButtonCToCpp::SetAccessibleName(const CefString& name) {
@@ -106,8 +104,7 @@ void CefButtonCToCpp::SetAccessibleName(const CefString& name) {
return;
// Execute
_struct->set_accessible_name(_struct,
name.GetStruct());
_struct->set_accessible_name(_struct, name.GetStruct());
}
CefRefPtr<CefBrowserView> CefButtonCToCpp::AsBrowserView() {
@@ -204,8 +201,7 @@ CefString CefButtonCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -224,7 +220,7 @@ bool CefButtonCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::IsAttached() {
@@ -238,7 +234,7 @@ bool CefButtonCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -254,11 +250,10 @@ bool CefButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefButtonCToCpp::GetDelegate() {
@@ -311,8 +306,7 @@ void CefButtonCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefButtonCToCpp::GetGroupID() {
@@ -337,8 +331,7 @@ void CefButtonCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefButtonCToCpp::GetParentView() {
@@ -363,8 +356,7 @@ CefRefPtr<CefView> CefButtonCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -378,8 +370,7 @@ void CefButtonCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefButtonCToCpp::GetBounds() {
@@ -418,8 +409,7 @@ void CefButtonCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefButtonCToCpp::GetSize() {
@@ -444,8 +434,7 @@ void CefButtonCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefButtonCToCpp::GetPosition() {
@@ -523,8 +512,7 @@ int CefButtonCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -549,8 +537,7 @@ void CefButtonCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefButtonCToCpp::IsVisible() {
@@ -564,7 +551,7 @@ bool CefButtonCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::IsDrawn() {
@@ -578,7 +565,7 @@ bool CefButtonCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefButtonCToCpp::SetEnabled(bool enabled) {
@@ -589,8 +576,7 @@ void CefButtonCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefButtonCToCpp::IsEnabled() {
@@ -604,7 +590,7 @@ bool CefButtonCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefButtonCToCpp::SetFocusable(bool focusable) {
@@ -615,8 +601,7 @@ void CefButtonCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefButtonCToCpp::IsFocusable() {
@@ -630,7 +615,7 @@ bool CefButtonCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::IsAccessibilityFocusable() {
@@ -644,7 +629,7 @@ bool CefButtonCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefButtonCToCpp::RequestFocus() {
@@ -666,8 +651,7 @@ void CefButtonCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefButtonCToCpp::GetBackgroundColor() {
@@ -692,11 +676,10 @@ bool CefButtonCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -707,11 +690,10 @@ bool CefButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -722,11 +704,10 @@ bool CefButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -737,15 +718,14 @@ bool CefButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -758,16 +738,15 @@ bool CefButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -780,38 +759,41 @@ bool CefButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefButtonCToCpp::CefButtonCToCpp() {
}
CefButtonCToCpp::CefButtonCToCpp() {}
template<> cef_button_t* CefCToCppRefCounted<CefButtonCToCpp, CefButton,
cef_button_t>::UnwrapDerived(CefWrapperType type, CefButton* c) {
template <>
cef_button_t*
CefCToCppRefCounted<CefButtonCToCpp, CefButton, cef_button_t>::UnwrapDerived(
CefWrapperType type,
CefButton* c) {
if (type == WT_LABEL_BUTTON) {
return reinterpret_cast<cef_button_t*>(CefLabelButtonCToCpp::Unwrap(
reinterpret_cast<CefLabelButton*>(c)));
return reinterpret_cast<cef_button_t*>(
CefLabelButtonCToCpp::Unwrap(reinterpret_cast<CefLabelButton*>(c)));
}
if (type == WT_MENU_BUTTON) {
return reinterpret_cast<cef_button_t*>(CefMenuButtonCToCpp::Unwrap(
reinterpret_cast<CefMenuButton*>(c)));
return reinterpret_cast<cef_button_t*>(
CefMenuButtonCToCpp::Unwrap(reinterpret_cast<CefMenuButton*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefButtonCToCpp, CefButton,
cef_button_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefButtonCToCpp, CefButton, cef_button_t>::DebugObjCt =
0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefButtonCToCpp, CefButton,
cef_button_t>::kWrapperType = WT_BUTTON;
template <>
CefWrapperType CefCToCppRefCounted<CefButtonCToCpp, CefButton, cef_button_t>::
kWrapperType = WT_BUTTON;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e96ae0220686ce1cb36adf65a51dd725eba8786e$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
@@ -18,10 +20,10 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_button.h"
#include "include/capi/views/cef_button_capi.h"
#include "include/views/cef_label_button.h"
#include "include/capi/views/cef_label_button_capi.h"
#include "include/views/cef_button.h"
#include "include/views/cef_label_button.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.

View File

@@ -9,13 +9,14 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2777421fafeccaca2d573bce9b42f28fa0407fb0$
//
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/button_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefButtonDelegateCToCpp::OnButtonPressed(CefRefPtr<CefButton> button) {
@@ -31,8 +32,7 @@ void CefButtonDelegateCToCpp::OnButtonPressed(CefRefPtr<CefButton> button) {
return;
// Execute
_struct->on_button_pressed(_struct,
CefButtonCppToC::Wrap(button));
_struct->on_button_pressed(_struct, CefButtonCppToC::Wrap(button));
}
void CefButtonDelegateCToCpp::OnButtonStateChanged(
@@ -49,13 +49,12 @@ void CefButtonDelegateCToCpp::OnButtonStateChanged(
return;
// Execute
_struct->on_button_state_changed(_struct,
CefButtonCppToC::Wrap(button));
_struct->on_button_state_changed(_struct, CefButtonCppToC::Wrap(button));
}
CefSize CefButtonDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -67,16 +66,16 @@ CefSize CefButtonDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefButtonDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -88,16 +87,16 @@ CefSize CefButtonDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefButtonDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -109,17 +108,17 @@ CefSize CefButtonDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefButtonDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -131,18 +130,18 @@ int CefButtonDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefButtonDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -158,16 +157,15 @@ void CefButtonDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefButtonDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -183,15 +181,13 @@ void CefButtonDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -203,13 +199,12 @@ void CefButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefButtonDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -221,33 +216,37 @@ void CefButtonDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefButtonDelegateCToCpp::CefButtonDelegateCToCpp() {
}
CefButtonDelegateCToCpp::CefButtonDelegateCToCpp() {}
template<> cef_button_delegate_t* CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate, cef_button_delegate_t>::UnwrapDerived(
CefWrapperType type, CefButtonDelegate* c) {
template <>
cef_button_delegate_t* CefCToCppRefCounted<
CefButtonDelegateCToCpp,
CefButtonDelegate,
cef_button_delegate_t>::UnwrapDerived(CefWrapperType type,
CefButtonDelegate* c) {
if (type == WT_MENU_BUTTON_DELEGATE) {
return reinterpret_cast<cef_button_delegate_t*>(
CefMenuButtonDelegateCToCpp::Unwrap(
reinterpret_cast<CefMenuButtonDelegate*>(c)));
reinterpret_cast<CefMenuButtonDelegate*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate, cef_button_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate,
cef_button_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate, cef_button_delegate_t>::kWrapperType =
template <>
CefWrapperType CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate,
cef_button_delegate_t>::kWrapperType =
WT_BUTTON_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0c1f554d07c5025bf039d701dd48a2ea109ecbfa$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_DELEGATE_CTOCPP_H_
@@ -18,17 +20,18 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_button_delegate.h"
#include "include/capi/views/cef_button_capi.h"
#include "include/capi/views/cef_button_delegate_capi.h"
#include "include/views/cef_button.h"
#include "include/capi/views/cef_button_capi.h"
#include "include/views/cef_button_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefButtonDelegateCToCpp
: public CefCToCppRefCounted<CefButtonDelegateCToCpp, CefButtonDelegate,
cef_button_delegate_t> {
: public CefCToCppRefCounted<CefButtonDelegateCToCpp,
CefButtonDelegate,
cef_button_delegate_t> {
public:
CefButtonDelegateCToCpp();
@@ -41,10 +44,12 @@ class CefButtonDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,11 +9,12 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2e6bd09f8d9e40e522cc5d1060666ebe8a295bc0$
//
#include <algorithm>
#include "libcef_dll/ctocpp/views/display_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefDisplay> CefDisplay::GetPrimaryDisplay() {
@@ -26,27 +27,27 @@ CefRefPtr<CefDisplay> CefDisplay::GetPrimaryDisplay() {
return CefDisplayCToCpp::Wrap(_retval);
}
CefRefPtr<CefDisplay> CefDisplay::GetDisplayNearestPoint(const CefPoint& point,
CefRefPtr<CefDisplay> CefDisplay::GetDisplayNearestPoint(
const CefPoint& point,
bool input_pixel_coords) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_display_t* _retval = cef_display_get_nearest_point(
&point,
input_pixel_coords);
cef_display_t* _retval =
cef_display_get_nearest_point(&point, input_pixel_coords);
// Return type: refptr_same
return CefDisplayCToCpp::Wrap(_retval);
}
CefRefPtr<CefDisplay> CefDisplay::GetDisplayMatchingBounds(
const CefRect& bounds, bool input_pixel_coords) {
const CefRect& bounds,
bool input_pixel_coords) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_display_t* _retval = cef_display_get_matching_bounds(
&bounds,
input_pixel_coords);
cef_display_t* _retval =
cef_display_get_matching_bounds(&bounds, input_pixel_coords);
// Return type: refptr_same
return CefDisplayCToCpp::Wrap(_retval);
@@ -73,7 +74,7 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
displaysList = new cef_display_t*[displaysCount];
DCHECK(displaysList);
if (displaysList) {
memset(displaysList, 0, sizeof(cef_display_t*)*displaysCount);
memset(displaysList, 0, sizeof(cef_display_t*) * displaysCount);
}
if (displaysList && displaysSize > 0) {
for (size_t i = 0; i < displaysSize; ++i) {
@@ -83,9 +84,7 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
}
// Execute
cef_display_get_alls(
&displaysCount,
displaysList);
cef_display_get_alls(&displaysCount, displaysList);
// Restore param:displays; type: refptr_vec_same_byref
displays.clear();
@@ -93,11 +92,10 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
for (size_t i = 0; i < displaysCount; ++i) {
displays.push_back(CefDisplayCToCpp::Wrap(displaysList[i]));
}
delete [] displaysList;
delete[] displaysList;
}
}
// VIRTUAL METHODS - Body may be edited by hand.
int64 CefDisplayCToCpp::GetID() {
@@ -136,8 +134,7 @@ void CefDisplayCToCpp::ConvertPointToPixels(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->convert_point_to_pixels(_struct,
&point);
_struct->convert_point_to_pixels(_struct, &point);
}
void CefDisplayCToCpp::ConvertPointFromPixels(CefPoint& point) {
@@ -148,8 +145,7 @@ void CefDisplayCToCpp::ConvertPointFromPixels(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->convert_point_from_pixels(_struct,
&point);
_struct->convert_point_from_pixels(_struct, &point);
}
CefRect CefDisplayCToCpp::GetBounds() {
@@ -194,22 +190,27 @@ int CefDisplayCToCpp::GetRotation() {
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefDisplayCToCpp::CefDisplayCToCpp() {
}
CefDisplayCToCpp::CefDisplayCToCpp() {}
template<> cef_display_t* CefCToCppRefCounted<CefDisplayCToCpp, CefDisplay,
cef_display_t>::UnwrapDerived(CefWrapperType type, CefDisplay* c) {
template <>
cef_display_t*
CefCToCppRefCounted<CefDisplayCToCpp, CefDisplay, cef_display_t>::UnwrapDerived(
CefWrapperType type,
CefDisplay* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefDisplayCToCpp,
CefDisplay, cef_display_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefDisplayCToCpp,
CefDisplay,
cef_display_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefDisplayCToCpp, CefDisplay,
cef_display_t>::kWrapperType = WT_DISPLAY;
template <>
CefWrapperType CefCToCppRefCounted<CefDisplayCToCpp,
CefDisplay,
cef_display_t>::kWrapperType = WT_DISPLAY;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=aa269f6a4dd9e01cb41f345ed926f8ea48f4e3a2$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_DISPLAY_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_DISPLAY_CTOCPP_H_
@@ -18,8 +20,8 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_display.h"
#include "include/capi/views/cef_display_capi.h"
#include "include/views/cef_display.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.

View File

@@ -9,11 +9,12 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=de60346a2373edcaa4087576ef4a33ce919f5b6d$
//
#include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefBoxLayout> CefFillLayoutCToCpp::AsBoxLayout() {
@@ -55,26 +56,30 @@ bool CefFillLayoutCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefFillLayoutCToCpp::CefFillLayoutCToCpp() {
}
CefFillLayoutCToCpp::CefFillLayoutCToCpp() {}
template<> cef_fill_layout_t* CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout, cef_fill_layout_t>::UnwrapDerived(CefWrapperType type,
CefFillLayout* c) {
template <>
cef_fill_layout_t*
CefCToCppRefCounted<CefFillLayoutCToCpp, CefFillLayout, cef_fill_layout_t>::
UnwrapDerived(CefWrapperType type, CefFillLayout* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout, cef_fill_layout_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout,
cef_fill_layout_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout, cef_fill_layout_t>::kWrapperType = WT_FILL_LAYOUT;
template <>
CefWrapperType CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout,
cef_fill_layout_t>::kWrapperType =
WT_FILL_LAYOUT;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=77e7a2a31224107e2728b64ad97ad899dd62269c$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_FILL_LAYOUT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_FILL_LAYOUT_CTOCPP_H_
@@ -18,15 +20,15 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_fill_layout.h"
#include "include/capi/views/cef_fill_layout_capi.h"
#include "include/views/cef_fill_layout.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefFillLayoutCToCpp
: public CefCToCppRefCounted<CefFillLayoutCToCpp, CefFillLayout,
cef_fill_layout_t> {
class CefFillLayoutCToCpp : public CefCToCppRefCounted<CefFillLayoutCToCpp,
CefFillLayout,
cef_fill_layout_t> {
public:
CefFillLayoutCToCpp();

View File

@@ -9,12 +9,14 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6ad7bcb4afded09f312d3ec082bb4df35da9beec$
//
#include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/views/label_button_ctocpp.h"
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
@@ -23,11 +25,11 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
CefRefPtr<CefButtonDelegate> delegate, const CefString& text,
CefRefPtr<CefButtonDelegate> delegate,
const CefString& text,
bool with_frame) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -39,15 +41,12 @@ CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
// Execute
cef_label_button_t* _retval = cef_label_button_create(
CefButtonDelegateCppToC::Wrap(delegate),
text.GetStruct(),
with_frame);
CefButtonDelegateCppToC::Wrap(delegate), text.GetStruct(), with_frame);
// Return type: refptr_same
return CefLabelButtonCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefMenuButton> CefLabelButtonCToCpp::AsMenuButton() {
@@ -77,8 +76,7 @@ void CefLabelButtonCToCpp::SetText(const CefString& text) {
return;
// Execute
_struct->set_text(_struct,
text.GetStruct());
_struct->set_text(_struct, text.GetStruct());
}
CefString CefLabelButtonCToCpp::GetText() {
@@ -98,7 +96,7 @@ CefString CefLabelButtonCToCpp::GetText() {
}
void CefLabelButtonCToCpp::SetImage(cef_button_state_t button_state,
CefRefPtr<CefImage> image) {
CefRefPtr<CefImage> image) {
cef_label_button_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_image))
return;
@@ -108,9 +106,7 @@ void CefLabelButtonCToCpp::SetImage(cef_button_state_t button_state,
// Unverified params: image
// Execute
_struct->set_image(_struct,
button_state,
CefImageCToCpp::Unwrap(image));
_struct->set_image(_struct, button_state, CefImageCToCpp::Unwrap(image));
}
CefRefPtr<CefImage> CefLabelButtonCToCpp::GetImage(
@@ -122,15 +118,14 @@ CefRefPtr<CefImage> CefLabelButtonCToCpp::GetImage(
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_image_t* _retval = _struct->get_image(_struct,
button_state);
cef_image_t* _retval = _struct->get_image(_struct, button_state);
// Return type: refptr_same
return CefImageCToCpp::Wrap(_retval);
}
void CefLabelButtonCToCpp::SetTextColor(cef_button_state_t for_state,
cef_color_t color) {
cef_color_t color) {
cef_label_button_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_text_color))
return;
@@ -138,9 +133,7 @@ void CefLabelButtonCToCpp::SetTextColor(cef_button_state_t for_state,
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_text_color(_struct,
for_state,
color);
_struct->set_text_color(_struct, for_state, color);
}
void CefLabelButtonCToCpp::SetEnabledTextColors(cef_color_t color) {
@@ -151,8 +144,7 @@ void CefLabelButtonCToCpp::SetEnabledTextColors(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled_text_colors(_struct,
color);
_struct->set_enabled_text_colors(_struct, color);
}
void CefLabelButtonCToCpp::SetFontList(const CefString& font_list) {
@@ -168,8 +160,7 @@ void CefLabelButtonCToCpp::SetFontList(const CefString& font_list) {
return;
// Execute
_struct->set_font_list(_struct,
font_list.GetStruct());
_struct->set_font_list(_struct, font_list.GetStruct());
}
void CefLabelButtonCToCpp::SetHorizontalAlignment(
@@ -181,8 +172,7 @@ void CefLabelButtonCToCpp::SetHorizontalAlignment(
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_horizontal_alignment(_struct,
alignment);
_struct->set_horizontal_alignment(_struct, alignment);
}
void CefLabelButtonCToCpp::SetMinimumSize(const CefSize& size) {
@@ -193,8 +183,7 @@ void CefLabelButtonCToCpp::SetMinimumSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_minimum_size(_struct,
&size);
_struct->set_minimum_size(_struct, &size);
}
void CefLabelButtonCToCpp::SetMaximumSize(const CefSize& size) {
@@ -205,8 +194,7 @@ void CefLabelButtonCToCpp::SetMaximumSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_maximum_size(_struct,
&size);
_struct->set_maximum_size(_struct, &size);
}
CefRefPtr<CefLabelButton> CefLabelButtonCToCpp::AsLabelButton() {
@@ -231,8 +219,7 @@ void CefLabelButtonCToCpp::SetState(cef_button_state_t state) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_state(_struct,
state);
_struct->set_state(_struct, state);
}
cef_button_state_t CefLabelButtonCToCpp::GetState() {
@@ -257,8 +244,7 @@ void CefLabelButtonCToCpp::SetInkDropEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_ink_drop_enabled(_struct,
enabled);
_struct->set_ink_drop_enabled(_struct, enabled);
}
void CefLabelButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
@@ -274,8 +260,7 @@ void CefLabelButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
return;
// Execute
_struct->set_tooltip_text(_struct,
tooltip_text.GetStruct());
_struct->set_tooltip_text(_struct, tooltip_text.GetStruct());
}
void CefLabelButtonCToCpp::SetAccessibleName(const CefString& name) {
@@ -291,8 +276,7 @@ void CefLabelButtonCToCpp::SetAccessibleName(const CefString& name) {
return;
// Execute
_struct->set_accessible_name(_struct,
name.GetStruct());
_struct->set_accessible_name(_struct, name.GetStruct());
}
CefRefPtr<CefBrowserView> CefLabelButtonCToCpp::AsBrowserView() {
@@ -389,8 +373,7 @@ CefString CefLabelButtonCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -409,7 +392,7 @@ bool CefLabelButtonCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::IsAttached() {
@@ -423,7 +406,7 @@ bool CefLabelButtonCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -439,11 +422,10 @@ bool CefLabelButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefLabelButtonCToCpp::GetDelegate() {
@@ -496,8 +478,7 @@ void CefLabelButtonCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefLabelButtonCToCpp::GetGroupID() {
@@ -522,8 +503,7 @@ void CefLabelButtonCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefLabelButtonCToCpp::GetParentView() {
@@ -548,8 +528,7 @@ CefRefPtr<CefView> CefLabelButtonCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -563,8 +542,7 @@ void CefLabelButtonCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefLabelButtonCToCpp::GetBounds() {
@@ -603,8 +581,7 @@ void CefLabelButtonCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefLabelButtonCToCpp::GetSize() {
@@ -629,8 +606,7 @@ void CefLabelButtonCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefLabelButtonCToCpp::GetPosition() {
@@ -708,8 +684,7 @@ int CefLabelButtonCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -734,8 +709,7 @@ void CefLabelButtonCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefLabelButtonCToCpp::IsVisible() {
@@ -749,7 +723,7 @@ bool CefLabelButtonCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::IsDrawn() {
@@ -763,7 +737,7 @@ bool CefLabelButtonCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefLabelButtonCToCpp::SetEnabled(bool enabled) {
@@ -774,8 +748,7 @@ void CefLabelButtonCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefLabelButtonCToCpp::IsEnabled() {
@@ -789,7 +762,7 @@ bool CefLabelButtonCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefLabelButtonCToCpp::SetFocusable(bool focusable) {
@@ -800,8 +773,7 @@ void CefLabelButtonCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefLabelButtonCToCpp::IsFocusable() {
@@ -815,7 +787,7 @@ bool CefLabelButtonCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::IsAccessibilityFocusable() {
@@ -829,7 +801,7 @@ bool CefLabelButtonCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefLabelButtonCToCpp::RequestFocus() {
@@ -851,8 +823,7 @@ void CefLabelButtonCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefLabelButtonCToCpp::GetBackgroundColor() {
@@ -877,11 +848,10 @@ bool CefLabelButtonCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -892,11 +862,10 @@ bool CefLabelButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -907,11 +876,10 @@ bool CefLabelButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -922,15 +890,14 @@ bool CefLabelButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -943,16 +910,15 @@ bool CefLabelButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefLabelButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -965,35 +931,38 @@ bool CefLabelButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefLabelButtonCToCpp::CefLabelButtonCToCpp() {
}
CefLabelButtonCToCpp::CefLabelButtonCToCpp() {}
template<> cef_label_button_t* CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton, cef_label_button_t>::UnwrapDerived(CefWrapperType type,
CefLabelButton* c) {
template <>
cef_label_button_t*
CefCToCppRefCounted<CefLabelButtonCToCpp, CefLabelButton, cef_label_button_t>::
UnwrapDerived(CefWrapperType type, CefLabelButton* c) {
if (type == WT_MENU_BUTTON) {
return reinterpret_cast<cef_label_button_t*>(CefMenuButtonCToCpp::Unwrap(
reinterpret_cast<CefMenuButton*>(c)));
return reinterpret_cast<cef_label_button_t*>(
CefMenuButtonCToCpp::Unwrap(reinterpret_cast<CefMenuButton*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton, cef_label_button_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton,
cef_label_button_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton, cef_label_button_t>::kWrapperType = WT_LABEL_BUTTON;
template <>
CefWrapperType CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton,
cef_label_button_t>::kWrapperType =
WT_LABEL_BUTTON;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ce64517474af4fd801c702c68d9e6acbb38cdea7$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_
@@ -18,17 +20,17 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_label_button.h"
#include "include/capi/views/cef_label_button_capi.h"
#include "include/views/cef_menu_button.h"
#include "include/capi/views/cef_menu_button_capi.h"
#include "include/views/cef_label_button.h"
#include "include/views/cef_menu_button.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefLabelButtonCToCpp
: public CefCToCppRefCounted<CefLabelButtonCToCpp, CefLabelButton,
cef_label_button_t> {
class CefLabelButtonCToCpp : public CefCToCppRefCounted<CefLabelButtonCToCpp,
CefLabelButton,
cef_label_button_t> {
public:
CefLabelButtonCToCpp();
@@ -37,7 +39,7 @@ class CefLabelButtonCToCpp
void SetText(const CefString& text) OVERRIDE;
CefString GetText() OVERRIDE;
void SetImage(cef_button_state_t button_state,
CefRefPtr<CefImage> image) OVERRIDE;
CefRefPtr<CefImage> image) OVERRIDE;
CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) OVERRIDE;
void SetTextColor(cef_button_state_t for_state, cef_color_t color) OVERRIDE;
void SetEnabledTextColors(cef_color_t color) OVERRIDE;

View File

@@ -9,12 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a519fd1a0f098ffbcfc309721e5b388a5e3b81d9$
//
#include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/layout_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefBoxLayout> CefLayoutCToCpp::AsBoxLayout() {
@@ -56,33 +57,37 @@ bool CefLayoutCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefLayoutCToCpp::CefLayoutCToCpp() {
}
CefLayoutCToCpp::CefLayoutCToCpp() {}
template<> cef_layout_t* CefCToCppRefCounted<CefLayoutCToCpp, CefLayout,
cef_layout_t>::UnwrapDerived(CefWrapperType type, CefLayout* c) {
template <>
cef_layout_t*
CefCToCppRefCounted<CefLayoutCToCpp, CefLayout, cef_layout_t>::UnwrapDerived(
CefWrapperType type,
CefLayout* c) {
if (type == WT_BOX_LAYOUT) {
return reinterpret_cast<cef_layout_t*>(CefBoxLayoutCToCpp::Unwrap(
reinterpret_cast<CefBoxLayout*>(c)));
return reinterpret_cast<cef_layout_t*>(
CefBoxLayoutCToCpp::Unwrap(reinterpret_cast<CefBoxLayout*>(c)));
}
if (type == WT_FILL_LAYOUT) {
return reinterpret_cast<cef_layout_t*>(CefFillLayoutCToCpp::Unwrap(
reinterpret_cast<CefFillLayout*>(c)));
return reinterpret_cast<cef_layout_t*>(
CefFillLayoutCToCpp::Unwrap(reinterpret_cast<CefFillLayout*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefLayoutCToCpp, CefLayout,
cef_layout_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefLayoutCToCpp, CefLayout, cef_layout_t>::DebugObjCt =
0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefLayoutCToCpp, CefLayout,
cef_layout_t>::kWrapperType = WT_LAYOUT;
template <>
CefWrapperType CefCToCppRefCounted<CefLayoutCToCpp, CefLayout, cef_layout_t>::
kWrapperType = WT_LAYOUT;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d40a6c56132bb4691591a17c6c55efa2d831a3d3$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LAYOUT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_LAYOUT_CTOCPP_H_
@@ -18,12 +20,12 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_layout.h"
#include "include/capi/views/cef_box_layout_capi.h"
#include "include/capi/views/cef_fill_layout_capi.h"
#include "include/capi/views/cef_layout_capi.h"
#include "include/views/cef_box_layout.h"
#include "include/capi/views/cef_box_layout_capi.h"
#include "include/views/cef_fill_layout.h"
#include "include/capi/views/cef_fill_layout_capi.h"
#include "include/views/cef_layout.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.

View File

@@ -9,27 +9,30 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=bdbe24f084050955892d6d78dcb36c0eccddbe6d$
//
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/views/label_button_ctocpp.h"
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
#include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate, const CefString& text,
bool with_frame, bool with_menu_marker) {
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: delegate; type: refptr_diff
@@ -39,22 +42,19 @@ CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
// Unverified params: text
// Execute
cef_menu_button_t* _retval = cef_menu_button_create(
CefMenuButtonDelegateCppToC::Wrap(delegate),
text.GetStruct(),
with_frame,
with_menu_marker);
cef_menu_button_t* _retval =
cef_menu_button_create(CefMenuButtonDelegateCppToC::Wrap(delegate),
text.GetStruct(), with_frame, with_menu_marker);
// Return type: refptr_same
return CefMenuButtonCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
void CefMenuButtonCToCpp::ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) {
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) {
cef_menu_button_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, show_menu))
return;
@@ -67,10 +67,8 @@ void CefMenuButtonCToCpp::ShowMenu(CefRefPtr<CefMenuModel> menu_model,
return;
// Execute
_struct->show_menu(_struct,
CefMenuModelCToCpp::Unwrap(menu_model),
&screen_point,
anchor_position);
_struct->show_menu(_struct, CefMenuModelCToCpp::Unwrap(menu_model),
&screen_point, anchor_position);
}
void CefMenuButtonCToCpp::TriggerMenu() {
@@ -85,8 +83,8 @@ void CefMenuButtonCToCpp::TriggerMenu() {
}
CefRefPtr<CefMenuButton> CefMenuButtonCToCpp::AsMenuButton() {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, as_menu_button))
return NULL;
@@ -100,8 +98,8 @@ CefRefPtr<CefMenuButton> CefMenuButtonCToCpp::AsMenuButton() {
}
void CefMenuButtonCToCpp::SetText(const CefString& text) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_text))
return;
@@ -113,13 +111,12 @@ void CefMenuButtonCToCpp::SetText(const CefString& text) {
return;
// Execute
_struct->set_text(_struct,
text.GetStruct());
_struct->set_text(_struct, text.GetStruct());
}
CefString CefMenuButtonCToCpp::GetText() {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_text))
return CefString();
@@ -135,9 +132,9 @@ CefString CefMenuButtonCToCpp::GetText() {
}
void CefMenuButtonCToCpp::SetImage(cef_button_state_t button_state,
CefRefPtr<CefImage> image) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
CefRefPtr<CefImage> image) {
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_image))
return;
@@ -146,59 +143,53 @@ void CefMenuButtonCToCpp::SetImage(cef_button_state_t button_state,
// Unverified params: image
// Execute
_struct->set_image(_struct,
button_state,
CefImageCToCpp::Unwrap(image));
_struct->set_image(_struct, button_state, CefImageCToCpp::Unwrap(image));
}
CefRefPtr<CefImage> CefMenuButtonCToCpp::GetImage(
cef_button_state_t button_state) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_image))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_image_t* _retval = _struct->get_image(_struct,
button_state);
cef_image_t* _retval = _struct->get_image(_struct, button_state);
// Return type: refptr_same
return CefImageCToCpp::Wrap(_retval);
}
void CefMenuButtonCToCpp::SetTextColor(cef_button_state_t for_state,
cef_color_t color) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_color_t color) {
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_text_color))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_text_color(_struct,
for_state,
color);
_struct->set_text_color(_struct, for_state, color);
}
void CefMenuButtonCToCpp::SetEnabledTextColors(cef_color_t color) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_enabled_text_colors))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled_text_colors(_struct,
color);
_struct->set_enabled_text_colors(_struct, color);
}
void CefMenuButtonCToCpp::SetFontList(const CefString& font_list) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_font_list))
return;
@@ -210,48 +201,44 @@ void CefMenuButtonCToCpp::SetFontList(const CefString& font_list) {
return;
// Execute
_struct->set_font_list(_struct,
font_list.GetStruct());
_struct->set_font_list(_struct, font_list.GetStruct());
}
void CefMenuButtonCToCpp::SetHorizontalAlignment(
cef_horizontal_alignment_t alignment) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_horizontal_alignment))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_horizontal_alignment(_struct,
alignment);
_struct->set_horizontal_alignment(_struct, alignment);
}
void CefMenuButtonCToCpp::SetMinimumSize(const CefSize& size) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_minimum_size))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_minimum_size(_struct,
&size);
_struct->set_minimum_size(_struct, &size);
}
void CefMenuButtonCToCpp::SetMaximumSize(const CefSize& size) {
cef_label_button_t* _struct = reinterpret_cast<cef_label_button_t*>(GetStruct(
));
cef_label_button_t* _struct =
reinterpret_cast<cef_label_button_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_maximum_size))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_maximum_size(_struct,
&size);
_struct->set_maximum_size(_struct, &size);
}
CefRefPtr<CefLabelButton> CefMenuButtonCToCpp::AsLabelButton() {
@@ -276,8 +263,7 @@ void CefMenuButtonCToCpp::SetState(cef_button_state_t state) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_state(_struct,
state);
_struct->set_state(_struct, state);
}
cef_button_state_t CefMenuButtonCToCpp::GetState() {
@@ -302,8 +288,7 @@ void CefMenuButtonCToCpp::SetInkDropEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_ink_drop_enabled(_struct,
enabled);
_struct->set_ink_drop_enabled(_struct, enabled);
}
void CefMenuButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
@@ -319,8 +304,7 @@ void CefMenuButtonCToCpp::SetTooltipText(const CefString& tooltip_text) {
return;
// Execute
_struct->set_tooltip_text(_struct,
tooltip_text.GetStruct());
_struct->set_tooltip_text(_struct, tooltip_text.GetStruct());
}
void CefMenuButtonCToCpp::SetAccessibleName(const CefString& name) {
@@ -336,8 +320,7 @@ void CefMenuButtonCToCpp::SetAccessibleName(const CefString& name) {
return;
// Execute
_struct->set_accessible_name(_struct,
name.GetStruct());
_struct->set_accessible_name(_struct, name.GetStruct());
}
CefRefPtr<CefBrowserView> CefMenuButtonCToCpp::AsBrowserView() {
@@ -434,8 +417,7 @@ CefString CefMenuButtonCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -454,7 +436,7 @@ bool CefMenuButtonCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::IsAttached() {
@@ -468,7 +450,7 @@ bool CefMenuButtonCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -484,11 +466,10 @@ bool CefMenuButtonCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefMenuButtonCToCpp::GetDelegate() {
@@ -541,8 +522,7 @@ void CefMenuButtonCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefMenuButtonCToCpp::GetGroupID() {
@@ -567,8 +547,7 @@ void CefMenuButtonCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefMenuButtonCToCpp::GetParentView() {
@@ -593,8 +572,7 @@ CefRefPtr<CefView> CefMenuButtonCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -608,8 +586,7 @@ void CefMenuButtonCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefMenuButtonCToCpp::GetBounds() {
@@ -648,8 +625,7 @@ void CefMenuButtonCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefMenuButtonCToCpp::GetSize() {
@@ -674,8 +650,7 @@ void CefMenuButtonCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefMenuButtonCToCpp::GetPosition() {
@@ -753,8 +728,7 @@ int CefMenuButtonCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -779,8 +753,7 @@ void CefMenuButtonCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefMenuButtonCToCpp::IsVisible() {
@@ -794,7 +767,7 @@ bool CefMenuButtonCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::IsDrawn() {
@@ -808,7 +781,7 @@ bool CefMenuButtonCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefMenuButtonCToCpp::SetEnabled(bool enabled) {
@@ -819,8 +792,7 @@ void CefMenuButtonCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefMenuButtonCToCpp::IsEnabled() {
@@ -834,7 +806,7 @@ bool CefMenuButtonCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefMenuButtonCToCpp::SetFocusable(bool focusable) {
@@ -845,8 +817,7 @@ void CefMenuButtonCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefMenuButtonCToCpp::IsFocusable() {
@@ -860,7 +831,7 @@ bool CefMenuButtonCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::IsAccessibilityFocusable() {
@@ -874,7 +845,7 @@ bool CefMenuButtonCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefMenuButtonCToCpp::RequestFocus() {
@@ -896,8 +867,7 @@ void CefMenuButtonCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefMenuButtonCToCpp::GetBackgroundColor() {
@@ -922,11 +892,10 @@ bool CefMenuButtonCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -937,11 +906,10 @@ bool CefMenuButtonCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -952,11 +920,10 @@ bool CefMenuButtonCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -967,15 +934,14 @@ bool CefMenuButtonCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -988,16 +954,15 @@ bool CefMenuButtonCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefMenuButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -1010,31 +975,34 @@ bool CefMenuButtonCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefMenuButtonCToCpp::CefMenuButtonCToCpp() {
}
CefMenuButtonCToCpp::CefMenuButtonCToCpp() {}
template<> cef_menu_button_t* CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton, cef_menu_button_t>::UnwrapDerived(CefWrapperType type,
CefMenuButton* c) {
template <>
cef_menu_button_t*
CefCToCppRefCounted<CefMenuButtonCToCpp, CefMenuButton, cef_menu_button_t>::
UnwrapDerived(CefWrapperType type, CefMenuButton* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton, cef_menu_button_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton,
cef_menu_button_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton, cef_menu_button_t>::kWrapperType = WT_MENU_BUTTON;
template <>
CefWrapperType CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton,
cef_menu_button_t>::kWrapperType =
WT_MENU_BUTTON;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ba470a970b4e0cd7a80058ff44d604e0a082a2e9$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_
@@ -18,22 +20,22 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_menu_button.h"
#include "include/capi/views/cef_menu_button_capi.h"
#include "include/views/cef_menu_button.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefMenuButtonCToCpp
: public CefCToCppRefCounted<CefMenuButtonCToCpp, CefMenuButton,
cef_menu_button_t> {
class CefMenuButtonCToCpp : public CefCToCppRefCounted<CefMenuButtonCToCpp,
CefMenuButton,
cef_menu_button_t> {
public:
CefMenuButtonCToCpp();
// CefMenuButton methods.
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) OVERRIDE;
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) OVERRIDE;
void TriggerMenu() OVERRIDE;
// CefLabelButton methods.
@@ -41,7 +43,7 @@ class CefMenuButtonCToCpp
void SetText(const CefString& text) OVERRIDE;
CefString GetText() OVERRIDE;
void SetImage(cef_button_state_t button_state,
CefRefPtr<CefImage> image) OVERRIDE;
CefRefPtr<CefImage> image) OVERRIDE;
CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) OVERRIDE;
void SetTextColor(cef_button_state_t for_state, cef_color_t color) OVERRIDE;
void SetEnabledTextColors(cef_color_t color) OVERRIDE;

View File

@@ -9,17 +9,19 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=149d24f6846b814d8207fc358bd77af7c82b037c$
//
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefMenuButtonDelegateCToCpp::OnMenuButtonPressed(
CefRefPtr<CefMenuButton> menu_button, const CefPoint& screen_point) {
CefRefPtr<CefMenuButton> menu_button,
const CefPoint& screen_point) {
cef_menu_button_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_menu_button_pressed))
return;
@@ -32,14 +34,13 @@ void CefMenuButtonDelegateCToCpp::OnMenuButtonPressed(
return;
// Execute
_struct->on_menu_button_pressed(_struct,
CefMenuButtonCppToC::Wrap(menu_button),
&screen_point);
_struct->on_menu_button_pressed(
_struct, CefMenuButtonCppToC::Wrap(menu_button), &screen_point);
}
void CefMenuButtonDelegateCToCpp::OnButtonPressed(CefRefPtr<CefButton> button) {
cef_button_delegate_t* _struct = reinterpret_cast<cef_button_delegate_t*>(
GetStruct());
cef_button_delegate_t* _struct =
reinterpret_cast<cef_button_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_button_pressed))
return;
@@ -51,14 +52,13 @@ void CefMenuButtonDelegateCToCpp::OnButtonPressed(CefRefPtr<CefButton> button) {
return;
// Execute
_struct->on_button_pressed(_struct,
CefButtonCppToC::Wrap(button));
_struct->on_button_pressed(_struct, CefButtonCppToC::Wrap(button));
}
void CefMenuButtonDelegateCToCpp::OnButtonStateChanged(
CefRefPtr<CefButton> button) {
cef_button_delegate_t* _struct = reinterpret_cast<cef_button_delegate_t*>(
GetStruct());
cef_button_delegate_t* _struct =
reinterpret_cast<cef_button_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_button_state_changed))
return;
@@ -70,13 +70,12 @@ void CefMenuButtonDelegateCToCpp::OnButtonStateChanged(
return;
// Execute
_struct->on_button_state_changed(_struct,
CefButtonCppToC::Wrap(button));
_struct->on_button_state_changed(_struct, CefButtonCppToC::Wrap(button));
}
CefSize CefMenuButtonDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -88,16 +87,16 @@ CefSize CefMenuButtonDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefMenuButtonDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -109,16 +108,16 @@ CefSize CefMenuButtonDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefMenuButtonDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -130,17 +129,17 @@ CefSize CefMenuButtonDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefMenuButtonDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -152,18 +151,19 @@ int CefMenuButtonDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefMenuButtonDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
void CefMenuButtonDelegateCToCpp::OnParentViewChanged(
CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -179,16 +179,15 @@ void CefMenuButtonDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefMenuButtonDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -204,15 +203,13 @@ void CefMenuButtonDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefMenuButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -224,13 +221,12 @@ void CefMenuButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefMenuButtonDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -242,28 +238,33 @@ void CefMenuButtonDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefMenuButtonDelegateCToCpp::CefMenuButtonDelegateCToCpp() {
}
CefMenuButtonDelegateCToCpp::CefMenuButtonDelegateCToCpp() {}
template<> cef_menu_button_delegate_t* CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate, cef_menu_button_delegate_t>::UnwrapDerived(
CefWrapperType type, CefMenuButtonDelegate* c) {
template <>
cef_menu_button_delegate_t* CefCToCppRefCounted<
CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate,
cef_menu_button_delegate_t>::UnwrapDerived(CefWrapperType type,
CefMenuButtonDelegate* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate, cef_menu_button_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate,
cef_menu_button_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate, cef_menu_button_delegate_t>::kWrapperType =
template <>
CefWrapperType CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate,
cef_menu_button_delegate_t>::kWrapperType =
WT_MENU_BUTTON_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=71ef57288d2a5fc3a22b1f22385ac43303f37256$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_
@@ -18,23 +20,24 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_menu_button_delegate.h"
#include "include/capi/views/cef_menu_button_capi.h"
#include "include/capi/views/cef_menu_button_delegate_capi.h"
#include "include/views/cef_menu_button.h"
#include "include/capi/views/cef_menu_button_capi.h"
#include "include/views/cef_menu_button_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefMenuButtonDelegateCToCpp
: public CefCToCppRefCounted<CefMenuButtonDelegateCToCpp,
CefMenuButtonDelegate, cef_menu_button_delegate_t> {
CefMenuButtonDelegate,
cef_menu_button_delegate_t> {
public:
CefMenuButtonDelegateCToCpp();
// CefMenuButtonDelegate methods.
void OnMenuButtonPressed(CefRefPtr<CefMenuButton> menu_button,
const CefPoint& screen_point) override;
const CefPoint& screen_point) override;
// CefButtonDelegate methods.
void OnButtonPressed(CefRefPtr<CefButton> button) override;
@@ -45,10 +48,12 @@ class CefMenuButtonDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2bb4549039d08672bb565effcda7826a192e266a$
//
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
@@ -23,7 +25,6 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefPanel> CefPanel::CreatePanel(
@@ -33,14 +34,13 @@ CefRefPtr<CefPanel> CefPanel::CreatePanel(
// Unverified params: delegate
// Execute
cef_panel_t* _retval = cef_panel_create(
CefPanelDelegateCppToC::Wrap(delegate));
cef_panel_t* _retval =
cef_panel_create(CefPanelDelegateCppToC::Wrap(delegate));
// Return type: refptr_same
return CefPanelCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefWindow> CefPanelCToCpp::AsWindow() {
@@ -80,8 +80,7 @@ CefRefPtr<CefBoxLayout> CefPanelCToCpp::SetToBoxLayout(
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_box_layout_t* _retval = _struct->set_to_box_layout(_struct,
&settings);
cef_box_layout_t* _retval = _struct->set_to_box_layout(_struct, &settings);
// Return type: refptr_same
return CefBoxLayoutCToCpp::Wrap(_retval);
@@ -125,8 +124,7 @@ void CefPanelCToCpp::AddChildView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->add_child_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->add_child_view(_struct, CefViewCToCpp::Unwrap(view));
}
void CefPanelCToCpp::AddChildViewAt(CefRefPtr<CefView> view, int index) {
@@ -146,9 +144,7 @@ void CefPanelCToCpp::AddChildViewAt(CefRefPtr<CefView> view, int index) {
return;
// Execute
_struct->add_child_view_at(_struct,
CefViewCToCpp::Unwrap(view),
index);
_struct->add_child_view_at(_struct, CefViewCToCpp::Unwrap(view), index);
}
void CefPanelCToCpp::ReorderChildView(CefRefPtr<CefView> view, int index) {
@@ -164,9 +160,7 @@ void CefPanelCToCpp::ReorderChildView(CefRefPtr<CefView> view, int index) {
return;
// Execute
_struct->reorder_child_view(_struct,
CefViewCToCpp::Unwrap(view),
index);
_struct->reorder_child_view(_struct, CefViewCToCpp::Unwrap(view), index);
}
void CefPanelCToCpp::RemoveChildView(CefRefPtr<CefView> view) {
@@ -182,8 +176,7 @@ void CefPanelCToCpp::RemoveChildView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->remove_child_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->remove_child_view(_struct, CefViewCToCpp::Unwrap(view));
}
void CefPanelCToCpp::RemoveAllChildViews() {
@@ -224,8 +217,7 @@ CefRefPtr<CefView> CefPanelCToCpp::GetChildViewAt(int index) {
return NULL;
// Execute
cef_view_t* _retval = _struct->get_child_view_at(_struct,
index);
cef_view_t* _retval = _struct->get_child_view_at(_struct, index);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -325,8 +317,7 @@ CefString CefPanelCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -345,7 +336,7 @@ bool CefPanelCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::IsAttached() {
@@ -359,7 +350,7 @@ bool CefPanelCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -375,11 +366,10 @@ bool CefPanelCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefPanelCToCpp::GetDelegate() {
@@ -432,8 +422,7 @@ void CefPanelCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefPanelCToCpp::GetGroupID() {
@@ -458,8 +447,7 @@ void CefPanelCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefPanelCToCpp::GetParentView() {
@@ -484,8 +472,7 @@ CefRefPtr<CefView> CefPanelCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -499,8 +486,7 @@ void CefPanelCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefPanelCToCpp::GetBounds() {
@@ -539,8 +525,7 @@ void CefPanelCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefPanelCToCpp::GetSize() {
@@ -565,8 +550,7 @@ void CefPanelCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefPanelCToCpp::GetPosition() {
@@ -644,8 +628,7 @@ int CefPanelCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -670,8 +653,7 @@ void CefPanelCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefPanelCToCpp::IsVisible() {
@@ -685,7 +667,7 @@ bool CefPanelCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::IsDrawn() {
@@ -699,7 +681,7 @@ bool CefPanelCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefPanelCToCpp::SetEnabled(bool enabled) {
@@ -710,8 +692,7 @@ void CefPanelCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefPanelCToCpp::IsEnabled() {
@@ -725,7 +706,7 @@ bool CefPanelCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefPanelCToCpp::SetFocusable(bool focusable) {
@@ -736,8 +717,7 @@ void CefPanelCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefPanelCToCpp::IsFocusable() {
@@ -751,7 +731,7 @@ bool CefPanelCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::IsAccessibilityFocusable() {
@@ -765,7 +745,7 @@ bool CefPanelCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefPanelCToCpp::RequestFocus() {
@@ -787,8 +767,7 @@ void CefPanelCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefPanelCToCpp::GetBackgroundColor() {
@@ -813,11 +792,10 @@ bool CefPanelCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -828,11 +806,10 @@ bool CefPanelCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -843,11 +820,10 @@ bool CefPanelCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -858,15 +834,14 @@ bool CefPanelCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -879,16 +854,15 @@ bool CefPanelCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefPanelCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -901,34 +875,37 @@ bool CefPanelCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefPanelCToCpp::CefPanelCToCpp() {
}
CefPanelCToCpp::CefPanelCToCpp() {}
template<> cef_panel_t* CefCToCppRefCounted<CefPanelCToCpp, CefPanel,
cef_panel_t>::UnwrapDerived(CefWrapperType type, CefPanel* c) {
template <>
cef_panel_t*
CefCToCppRefCounted<CefPanelCToCpp, CefPanel, cef_panel_t>::UnwrapDerived(
CefWrapperType type,
CefPanel* c) {
if (type == WT_WINDOW) {
return reinterpret_cast<cef_panel_t*>(CefWindowCToCpp::Unwrap(
reinterpret_cast<CefWindow*>(c)));
return reinterpret_cast<cef_panel_t*>(
CefWindowCToCpp::Unwrap(reinterpret_cast<CefWindow*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefPanelCToCpp, CefPanel,
cef_panel_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefPanelCToCpp, CefPanel, cef_panel_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefPanelCToCpp, CefPanel,
cef_panel_t>::kWrapperType = WT_PANEL;
template <>
CefWrapperType
CefCToCppRefCounted<CefPanelCToCpp, CefPanel, cef_panel_t>::kWrapperType =
WT_PANEL;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=9d99661767ab4fdc94ea011361addc51ccc1fde3$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_
@@ -18,16 +20,16 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_panel.h"
#include "include/capi/views/cef_panel_capi.h"
#include "include/views/cef_box_layout.h"
#include "include/capi/views/cef_box_layout_capi.h"
#include "include/views/cef_fill_layout.h"
#include "include/capi/views/cef_fill_layout_capi.h"
#include "include/views/cef_layout.h"
#include "include/capi/views/cef_layout_capi.h"
#include "include/views/cef_window.h"
#include "include/capi/views/cef_panel_capi.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_box_layout.h"
#include "include/views/cef_fill_layout.h"
#include "include/views/cef_layout.h"
#include "include/views/cef_panel.h"
#include "include/views/cef_window.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.

View File

@@ -9,17 +9,18 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=85c20ac96c3594ba48eeba93a5be33f53223f2ab$
//
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefSize CefPanelDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -31,16 +32,16 @@ CefSize CefPanelDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefPanelDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -52,16 +53,16 @@ CefSize CefPanelDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefPanelDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -73,17 +74,17 @@ CefSize CefPanelDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefPanelDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -95,18 +96,18 @@ int CefPanelDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefPanelDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -122,16 +123,15 @@ void CefPanelDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefPanelDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -147,15 +147,13 @@ void CefPanelDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefPanelDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -167,13 +165,12 @@ void CefPanelDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefPanelDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -185,32 +182,37 @@ void CefPanelDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefPanelDelegateCToCpp::CefPanelDelegateCToCpp() {
}
CefPanelDelegateCToCpp::CefPanelDelegateCToCpp() {}
template<> cef_panel_delegate_t* CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate, cef_panel_delegate_t>::UnwrapDerived(CefWrapperType type,
CefPanelDelegate* c) {
template <>
cef_panel_delegate_t*
CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate,
cef_panel_delegate_t>::UnwrapDerived(CefWrapperType type,
CefPanelDelegate* c) {
if (type == WT_WINDOW_DELEGATE) {
return reinterpret_cast<cef_panel_delegate_t*>(
CefWindowDelegateCToCpp::Unwrap(reinterpret_cast<CefWindowDelegate*>(
c)));
CefWindowDelegateCToCpp::Unwrap(
reinterpret_cast<CefWindowDelegate*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate, cef_panel_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate,
cef_panel_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate, cef_panel_delegate_t>::kWrapperType = WT_PANEL_DELEGATE;
template <>
CefWrapperType CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate,
cef_panel_delegate_t>::kWrapperType =
WT_PANEL_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2905a9ae48b8393c7bf1751e6a5a10b763cded7d$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_DELEGATE_CTOCPP_H_
@@ -18,15 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_panel_delegate.h"
#include "include/capi/views/cef_panel_delegate_capi.h"
#include "include/views/cef_panel_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefPanelDelegateCToCpp
: public CefCToCppRefCounted<CefPanelDelegateCToCpp, CefPanelDelegate,
cef_panel_delegate_t> {
: public CefCToCppRefCounted<CefPanelDelegateCToCpp,
CefPanelDelegate,
cef_panel_delegate_t> {
public:
CefPanelDelegateCToCpp();
@@ -37,10 +40,12 @@ class CefPanelDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1d8214a457c639f3b107c50c1da51c9bb90217db$
//
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
@@ -19,7 +21,6 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefScrollView> CefScrollView::CreateScrollView(
@@ -29,14 +30,13 @@ CefRefPtr<CefScrollView> CefScrollView::CreateScrollView(
// Unverified params: delegate
// Execute
cef_scroll_view_t* _retval = cef_scroll_view_create(
CefViewDelegateCppToC::Wrap(delegate));
cef_scroll_view_t* _retval =
cef_scroll_view_create(CefViewDelegateCppToC::Wrap(delegate));
// Return type: refptr_same
return CefScrollViewCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
void CefScrollViewCToCpp::SetContentView(CefRefPtr<CefView> view) {
@@ -52,8 +52,7 @@ void CefScrollViewCToCpp::SetContentView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->set_content_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->set_content_view(_struct, CefViewCToCpp::Unwrap(view));
}
CefRefPtr<CefView> CefScrollViewCToCpp::GetContentView() {
@@ -95,7 +94,7 @@ bool CefScrollViewCToCpp::HasHorizontalScrollbar() {
int _retval = _struct->has_horizontal_scrollbar(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
int CefScrollViewCToCpp::GetHorizontalScrollbarHeight() {
@@ -123,7 +122,7 @@ bool CefScrollViewCToCpp::HasVerticalScrollbar() {
int _retval = _struct->has_vertical_scrollbar(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
int CefScrollViewCToCpp::GetVerticalScrollbarWidth() {
@@ -234,8 +233,7 @@ CefString CefScrollViewCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -254,7 +252,7 @@ bool CefScrollViewCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::IsAttached() {
@@ -268,7 +266,7 @@ bool CefScrollViewCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -284,11 +282,10 @@ bool CefScrollViewCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefScrollViewCToCpp::GetDelegate() {
@@ -341,8 +338,7 @@ void CefScrollViewCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefScrollViewCToCpp::GetGroupID() {
@@ -367,8 +363,7 @@ void CefScrollViewCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefScrollViewCToCpp::GetParentView() {
@@ -393,8 +388,7 @@ CefRefPtr<CefView> CefScrollViewCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -408,8 +402,7 @@ void CefScrollViewCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefScrollViewCToCpp::GetBounds() {
@@ -448,8 +441,7 @@ void CefScrollViewCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefScrollViewCToCpp::GetSize() {
@@ -474,8 +466,7 @@ void CefScrollViewCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefScrollViewCToCpp::GetPosition() {
@@ -553,8 +544,7 @@ int CefScrollViewCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -579,8 +569,7 @@ void CefScrollViewCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefScrollViewCToCpp::IsVisible() {
@@ -594,7 +583,7 @@ bool CefScrollViewCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::IsDrawn() {
@@ -608,7 +597,7 @@ bool CefScrollViewCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefScrollViewCToCpp::SetEnabled(bool enabled) {
@@ -619,8 +608,7 @@ void CefScrollViewCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefScrollViewCToCpp::IsEnabled() {
@@ -634,7 +622,7 @@ bool CefScrollViewCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefScrollViewCToCpp::SetFocusable(bool focusable) {
@@ -645,8 +633,7 @@ void CefScrollViewCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefScrollViewCToCpp::IsFocusable() {
@@ -660,7 +647,7 @@ bool CefScrollViewCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::IsAccessibilityFocusable() {
@@ -674,7 +661,7 @@ bool CefScrollViewCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefScrollViewCToCpp::RequestFocus() {
@@ -696,8 +683,7 @@ void CefScrollViewCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefScrollViewCToCpp::GetBackgroundColor() {
@@ -722,11 +708,10 @@ bool CefScrollViewCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -737,11 +722,10 @@ bool CefScrollViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -752,11 +736,10 @@ bool CefScrollViewCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -767,15 +750,14 @@ bool CefScrollViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -788,16 +770,15 @@ bool CefScrollViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefScrollViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -810,31 +791,34 @@ bool CefScrollViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefScrollViewCToCpp::CefScrollViewCToCpp() {
}
CefScrollViewCToCpp::CefScrollViewCToCpp() {}
template<> cef_scroll_view_t* CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView, cef_scroll_view_t>::UnwrapDerived(CefWrapperType type,
CefScrollView* c) {
template <>
cef_scroll_view_t*
CefCToCppRefCounted<CefScrollViewCToCpp, CefScrollView, cef_scroll_view_t>::
UnwrapDerived(CefWrapperType type, CefScrollView* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView, cef_scroll_view_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView,
cef_scroll_view_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView, cef_scroll_view_t>::kWrapperType = WT_SCROLL_VIEW;
template <>
CefWrapperType CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView,
cef_scroll_view_t>::kWrapperType =
WT_SCROLL_VIEW;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=66a00808f5796a34066e53c70fadcbff51158f03$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_SCROLL_VIEW_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_SCROLL_VIEW_CTOCPP_H_
@@ -18,15 +20,15 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_scroll_view.h"
#include "include/capi/views/cef_scroll_view_capi.h"
#include "include/views/cef_scroll_view.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefScrollViewCToCpp
: public CefCToCppRefCounted<CefScrollViewCToCpp, CefScrollView,
cef_scroll_view_t> {
class CefScrollViewCToCpp : public CefCToCppRefCounted<CefScrollViewCToCpp,
CefScrollView,
cef_scroll_view_t> {
public:
CefScrollViewCToCpp();

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5b2c763a6d31b66c7310b67d5d7424676cd9c85c$
//
#include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
@@ -20,7 +22,6 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTextfield> CefTextfield::CreateTextfield(
@@ -30,14 +31,13 @@ CefRefPtr<CefTextfield> CefTextfield::CreateTextfield(
// Unverified params: delegate
// Execute
cef_textfield_t* _retval = cef_textfield_create(
CefTextfieldDelegateCppToC::Wrap(delegate));
cef_textfield_t* _retval =
cef_textfield_create(CefTextfieldDelegateCppToC::Wrap(delegate));
// Return type: refptr_same
return CefTextfieldCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
void CefTextfieldCToCpp::SetPasswordInput(bool password_input) {
@@ -48,8 +48,7 @@ void CefTextfieldCToCpp::SetPasswordInput(bool password_input) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_password_input(_struct,
password_input);
_struct->set_password_input(_struct, password_input);
}
bool CefTextfieldCToCpp::IsPasswordInput() {
@@ -63,7 +62,7 @@ bool CefTextfieldCToCpp::IsPasswordInput() {
int _retval = _struct->is_password_input(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldCToCpp::SetReadOnly(bool read_only) {
@@ -74,8 +73,7 @@ void CefTextfieldCToCpp::SetReadOnly(bool read_only) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_read_only(_struct,
read_only);
_struct->set_read_only(_struct, read_only);
}
bool CefTextfieldCToCpp::IsReadOnly() {
@@ -89,7 +87,7 @@ bool CefTextfieldCToCpp::IsReadOnly() {
int _retval = _struct->is_read_only(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefString CefTextfieldCToCpp::GetText() {
@@ -121,8 +119,7 @@ void CefTextfieldCToCpp::SetText(const CefString& text) {
return;
// Execute
_struct->set_text(_struct,
text.GetStruct());
_struct->set_text(_struct, text.GetStruct());
}
void CefTextfieldCToCpp::AppendText(const CefString& text) {
@@ -138,8 +135,7 @@ void CefTextfieldCToCpp::AppendText(const CefString& text) {
return;
// Execute
_struct->append_text(_struct,
text.GetStruct());
_struct->append_text(_struct, text.GetStruct());
}
void CefTextfieldCToCpp::InsertOrReplaceText(const CefString& text) {
@@ -155,8 +151,7 @@ void CefTextfieldCToCpp::InsertOrReplaceText(const CefString& text) {
return;
// Execute
_struct->insert_or_replace_text(_struct,
text.GetStruct());
_struct->insert_or_replace_text(_struct, text.GetStruct());
}
bool CefTextfieldCToCpp::HasSelection() {
@@ -170,7 +165,7 @@ bool CefTextfieldCToCpp::HasSelection() {
int _retval = _struct->has_selection(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefString CefTextfieldCToCpp::GetSelectedText() {
@@ -197,8 +192,7 @@ void CefTextfieldCToCpp::SelectAll(bool reversed) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->select_all(_struct,
reversed);
_struct->select_all(_struct, reversed);
}
void CefTextfieldCToCpp::ClearSelection() {
@@ -234,8 +228,7 @@ void CefTextfieldCToCpp::SelectRange(const CefRange& range) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->select_range(_struct,
&range);
_struct->select_range(_struct, &range);
}
size_t CefTextfieldCToCpp::GetCursorPosition() {
@@ -260,8 +253,7 @@ void CefTextfieldCToCpp::SetTextColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_text_color(_struct,
color);
_struct->set_text_color(_struct, color);
}
cef_color_t CefTextfieldCToCpp::GetTextColor() {
@@ -286,8 +278,7 @@ void CefTextfieldCToCpp::SetSelectionTextColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_selection_text_color(_struct,
color);
_struct->set_selection_text_color(_struct, color);
}
cef_color_t CefTextfieldCToCpp::GetSelectionTextColor() {
@@ -312,8 +303,7 @@ void CefTextfieldCToCpp::SetSelectionBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_selection_background_color(_struct,
color);
_struct->set_selection_background_color(_struct, color);
}
cef_color_t CefTextfieldCToCpp::GetSelectionBackgroundColor() {
@@ -343,12 +333,11 @@ void CefTextfieldCToCpp::SetFontList(const CefString& font_list) {
return;
// Execute
_struct->set_font_list(_struct,
font_list.GetStruct());
_struct->set_font_list(_struct, font_list.GetStruct());
}
void CefTextfieldCToCpp::ApplyTextColor(cef_color_t color,
const CefRange& range) {
const CefRange& range) {
cef_textfield_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, apply_text_color))
return;
@@ -356,13 +345,12 @@ void CefTextfieldCToCpp::ApplyTextColor(cef_color_t color,
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->apply_text_color(_struct,
color,
&range);
_struct->apply_text_color(_struct, color, &range);
}
void CefTextfieldCToCpp::ApplyTextStyle(cef_text_style_t style, bool add,
const CefRange& range) {
void CefTextfieldCToCpp::ApplyTextStyle(cef_text_style_t style,
bool add,
const CefRange& range) {
cef_textfield_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, apply_text_style))
return;
@@ -370,10 +358,7 @@ void CefTextfieldCToCpp::ApplyTextStyle(cef_text_style_t style, bool add,
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->apply_text_style(_struct,
style,
add,
&range);
_struct->apply_text_style(_struct, style, add, &range);
}
bool CefTextfieldCToCpp::IsCommandEnabled(int command_id) {
@@ -384,11 +369,10 @@ bool CefTextfieldCToCpp::IsCommandEnabled(int command_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_command_enabled(_struct,
command_id);
int _retval = _struct->is_command_enabled(_struct, command_id);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldCToCpp::ExecuteCommand(int command_id) {
@@ -399,8 +383,7 @@ void CefTextfieldCToCpp::ExecuteCommand(int command_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->execute_command(_struct,
command_id);
_struct->execute_command(_struct, command_id);
}
void CefTextfieldCToCpp::ClearEditHistory() {
@@ -427,8 +410,7 @@ void CefTextfieldCToCpp::SetPlaceholderText(const CefString& text) {
return;
// Execute
_struct->set_placeholder_text(_struct,
text.GetStruct());
_struct->set_placeholder_text(_struct, text.GetStruct());
}
CefString CefTextfieldCToCpp::GetPlaceholderText() {
@@ -455,8 +437,7 @@ void CefTextfieldCToCpp::SetPlaceholderTextColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_placeholder_text_color(_struct,
color);
_struct->set_placeholder_text_color(_struct, color);
}
void CefTextfieldCToCpp::SetAccessibleName(const CefString& name) {
@@ -472,8 +453,7 @@ void CefTextfieldCToCpp::SetAccessibleName(const CefString& name) {
return;
// Execute
_struct->set_accessible_name(_struct,
name.GetStruct());
_struct->set_accessible_name(_struct, name.GetStruct());
}
CefRefPtr<CefBrowserView> CefTextfieldCToCpp::AsBrowserView() {
@@ -570,8 +550,7 @@ CefString CefTextfieldCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -590,7 +569,7 @@ bool CefTextfieldCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::IsAttached() {
@@ -604,7 +583,7 @@ bool CefTextfieldCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -620,11 +599,10 @@ bool CefTextfieldCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefTextfieldCToCpp::GetDelegate() {
@@ -677,8 +655,7 @@ void CefTextfieldCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefTextfieldCToCpp::GetGroupID() {
@@ -703,8 +680,7 @@ void CefTextfieldCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefTextfieldCToCpp::GetParentView() {
@@ -729,8 +705,7 @@ CefRefPtr<CefView> CefTextfieldCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -744,8 +719,7 @@ void CefTextfieldCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefTextfieldCToCpp::GetBounds() {
@@ -784,8 +758,7 @@ void CefTextfieldCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefTextfieldCToCpp::GetSize() {
@@ -810,8 +783,7 @@ void CefTextfieldCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefTextfieldCToCpp::GetPosition() {
@@ -889,8 +861,7 @@ int CefTextfieldCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -915,8 +886,7 @@ void CefTextfieldCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefTextfieldCToCpp::IsVisible() {
@@ -930,7 +900,7 @@ bool CefTextfieldCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::IsDrawn() {
@@ -944,7 +914,7 @@ bool CefTextfieldCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldCToCpp::SetEnabled(bool enabled) {
@@ -955,8 +925,7 @@ void CefTextfieldCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefTextfieldCToCpp::IsEnabled() {
@@ -970,7 +939,7 @@ bool CefTextfieldCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldCToCpp::SetFocusable(bool focusable) {
@@ -981,8 +950,7 @@ void CefTextfieldCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefTextfieldCToCpp::IsFocusable() {
@@ -996,7 +964,7 @@ bool CefTextfieldCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::IsAccessibilityFocusable() {
@@ -1010,7 +978,7 @@ bool CefTextfieldCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldCToCpp::RequestFocus() {
@@ -1032,8 +1000,7 @@ void CefTextfieldCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefTextfieldCToCpp::GetBackgroundColor() {
@@ -1058,11 +1025,10 @@ bool CefTextfieldCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -1073,11 +1039,10 @@ bool CefTextfieldCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -1088,11 +1053,10 @@ bool CefTextfieldCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -1103,15 +1067,14 @@ bool CefTextfieldCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -1124,16 +1087,15 @@ bool CefTextfieldCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefTextfieldCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -1146,31 +1108,34 @@ bool CefTextfieldCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefTextfieldCToCpp::CefTextfieldCToCpp() {
}
CefTextfieldCToCpp::CefTextfieldCToCpp() {}
template<> cef_textfield_t* CefCToCppRefCounted<CefTextfieldCToCpp,
CefTextfield, cef_textfield_t>::UnwrapDerived(CefWrapperType type,
CefTextfield* c) {
template <>
cef_textfield_t*
CefCToCppRefCounted<CefTextfieldCToCpp, CefTextfield, cef_textfield_t>::
UnwrapDerived(CefWrapperType type, CefTextfield* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefTextfieldCToCpp,
CefTextfield, cef_textfield_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefTextfieldCToCpp,
CefTextfield,
cef_textfield_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefTextfieldCToCpp, CefTextfield,
cef_textfield_t>::kWrapperType = WT_TEXTFIELD;
template <>
CefWrapperType CefCToCppRefCounted<CefTextfieldCToCpp,
CefTextfield,
cef_textfield_t>::kWrapperType =
WT_TEXTFIELD;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6b2021efb395846e372f8c453bac1d5a81778ad6$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_
@@ -18,15 +20,15 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_textfield.h"
#include "include/capi/views/cef_textfield_capi.h"
#include "include/views/cef_textfield.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTextfieldCToCpp
: public CefCToCppRefCounted<CefTextfieldCToCpp, CefTextfield,
cef_textfield_t> {
class CefTextfieldCToCpp : public CefCToCppRefCounted<CefTextfieldCToCpp,
CefTextfield,
cef_textfield_t> {
public:
CefTextfieldCToCpp();
@@ -54,8 +56,9 @@ class CefTextfieldCToCpp
cef_color_t GetSelectionBackgroundColor() OVERRIDE;
void SetFontList(const CefString& font_list) OVERRIDE;
void ApplyTextColor(cef_color_t color, const CefRange& range) OVERRIDE;
void ApplyTextStyle(cef_text_style_t style, bool add,
const CefRange& range) OVERRIDE;
void ApplyTextStyle(cef_text_style_t style,
bool add,
const CefRange& range) OVERRIDE;
bool IsCommandEnabled(int command_id) OVERRIDE;
void ExecuteCommand(int command_id) OVERRIDE;
void ClearEditHistory() OVERRIDE;

View File

@@ -9,16 +9,17 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=da5f37cac68a3759f2dc14056f25f33fb2957315$
//
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefTextfieldDelegateCToCpp::OnKeyEvent(CefRefPtr<CefTextfield> textfield,
const CefKeyEvent& event) {
const CefKeyEvent& event) {
cef_textfield_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_key_event))
return false;
@@ -31,12 +32,11 @@ bool CefTextfieldDelegateCToCpp::OnKeyEvent(CefRefPtr<CefTextfield> textfield,
return false;
// Execute
int _retval = _struct->on_key_event(_struct,
CefTextfieldCppToC::Wrap(textfield),
&event);
int _retval = _struct->on_key_event(
_struct, CefTextfieldCppToC::Wrap(textfield), &event);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefTextfieldDelegateCToCpp::OnAfterUserAction(
@@ -53,13 +53,12 @@ void CefTextfieldDelegateCToCpp::OnAfterUserAction(
return;
// Execute
_struct->on_after_user_action(_struct,
CefTextfieldCppToC::Wrap(textfield));
_struct->on_after_user_action(_struct, CefTextfieldCppToC::Wrap(textfield));
}
CefSize CefTextfieldDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -71,16 +70,16 @@ CefSize CefTextfieldDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefTextfieldDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -92,16 +91,16 @@ CefSize CefTextfieldDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefTextfieldDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -113,17 +112,17 @@ CefSize CefTextfieldDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefTextfieldDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -135,18 +134,19 @@ int CefTextfieldDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefTextfieldDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
void CefTextfieldDelegateCToCpp::OnParentViewChanged(
CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -162,16 +162,15 @@ void CefTextfieldDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefTextfieldDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -187,15 +186,13 @@ void CefTextfieldDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefTextfieldDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -207,13 +204,12 @@ void CefTextfieldDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefTextfieldDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -225,28 +221,33 @@ void CefTextfieldDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefTextfieldDelegateCToCpp::CefTextfieldDelegateCToCpp() {
}
CefTextfieldDelegateCToCpp::CefTextfieldDelegateCToCpp() {}
template<> cef_textfield_delegate_t* CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate, cef_textfield_delegate_t>::UnwrapDerived(
CefWrapperType type, CefTextfieldDelegate* c) {
template <>
cef_textfield_delegate_t* CefCToCppRefCounted<
CefTextfieldDelegateCToCpp,
CefTextfieldDelegate,
cef_textfield_delegate_t>::UnwrapDerived(CefWrapperType type,
CefTextfieldDelegate* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate, cef_textfield_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate,
cef_textfield_delegate_t>::DebugObjCt =
0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate, cef_textfield_delegate_t>::kWrapperType =
template <>
CefWrapperType CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate,
cef_textfield_delegate_t>::kWrapperType =
WT_TEXTFIELD_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c316d6a78b4aa8715a63c2e3d754438572615c55$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_DELEGATE_CTOCPP_H_
@@ -18,23 +20,24 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_textfield_delegate.h"
#include "include/capi/views/cef_textfield_capi.h"
#include "include/capi/views/cef_textfield_delegate_capi.h"
#include "include/views/cef_textfield.h"
#include "include/capi/views/cef_textfield_capi.h"
#include "include/views/cef_textfield_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefTextfieldDelegateCToCpp
: public CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
CefTextfieldDelegate, cef_textfield_delegate_t> {
CefTextfieldDelegate,
cef_textfield_delegate_t> {
public:
CefTextfieldDelegateCToCpp();
// CefTextfieldDelegate methods.
bool OnKeyEvent(CefRefPtr<CefTextfield> textfield,
const CefKeyEvent& event) override;
const CefKeyEvent& event) override;
void OnAfterUserAction(CefRefPtr<CefTextfield> textfield) override;
// CefViewDelegate methods.
@@ -42,10 +45,12 @@ class CefTextfieldDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7d48e623cbf70be51e4809e2fd1b08341d5dd620$
//
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
@@ -21,7 +23,6 @@
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefBrowserView> CefViewCToCpp::AsBrowserView() {
@@ -118,8 +119,7 @@ CefString CefViewCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -138,7 +138,7 @@ bool CefViewCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::IsAttached() {
@@ -152,7 +152,7 @@ bool CefViewCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -168,11 +168,10 @@ bool CefViewCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefViewCToCpp::GetDelegate() {
@@ -225,8 +224,7 @@ void CefViewCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefViewCToCpp::GetGroupID() {
@@ -251,8 +249,7 @@ void CefViewCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefViewCToCpp::GetParentView() {
@@ -277,8 +274,7 @@ CefRefPtr<CefView> CefViewCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -292,8 +288,7 @@ void CefViewCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefViewCToCpp::GetBounds() {
@@ -332,8 +327,7 @@ void CefViewCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefViewCToCpp::GetSize() {
@@ -358,8 +352,7 @@ void CefViewCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefViewCToCpp::GetPosition() {
@@ -437,8 +430,7 @@ int CefViewCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -463,8 +455,7 @@ void CefViewCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefViewCToCpp::IsVisible() {
@@ -478,7 +469,7 @@ bool CefViewCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::IsDrawn() {
@@ -492,7 +483,7 @@ bool CefViewCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefViewCToCpp::SetEnabled(bool enabled) {
@@ -503,8 +494,7 @@ void CefViewCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefViewCToCpp::IsEnabled() {
@@ -518,7 +508,7 @@ bool CefViewCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefViewCToCpp::SetFocusable(bool focusable) {
@@ -529,8 +519,7 @@ void CefViewCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefViewCToCpp::IsFocusable() {
@@ -544,7 +533,7 @@ bool CefViewCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::IsAccessibilityFocusable() {
@@ -558,7 +547,7 @@ bool CefViewCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefViewCToCpp::RequestFocus() {
@@ -580,8 +569,7 @@ void CefViewCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefViewCToCpp::GetBackgroundColor() {
@@ -606,11 +594,10 @@ bool CefViewCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -621,11 +608,10 @@ bool CefViewCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -636,11 +622,10 @@ bool CefViewCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -651,15 +636,14 @@ bool CefViewCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -672,16 +656,15 @@ bool CefViewCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -694,62 +677,65 @@ bool CefViewCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefViewCToCpp::CefViewCToCpp() {
}
CefViewCToCpp::CefViewCToCpp() {}
template<> cef_view_t* CefCToCppRefCounted<CefViewCToCpp, CefView,
cef_view_t>::UnwrapDerived(CefWrapperType type, CefView* c) {
template <>
cef_view_t*
CefCToCppRefCounted<CefViewCToCpp, CefView, cef_view_t>::UnwrapDerived(
CefWrapperType type,
CefView* c) {
if (type == WT_BROWSER_VIEW) {
return reinterpret_cast<cef_view_t*>(CefBrowserViewCToCpp::Unwrap(
reinterpret_cast<CefBrowserView*>(c)));
return reinterpret_cast<cef_view_t*>(
CefBrowserViewCToCpp::Unwrap(reinterpret_cast<CefBrowserView*>(c)));
}
if (type == WT_BUTTON) {
return reinterpret_cast<cef_view_t*>(CefButtonCToCpp::Unwrap(
reinterpret_cast<CefButton*>(c)));
return reinterpret_cast<cef_view_t*>(
CefButtonCToCpp::Unwrap(reinterpret_cast<CefButton*>(c)));
}
if (type == WT_LABEL_BUTTON) {
return reinterpret_cast<cef_view_t*>(CefLabelButtonCToCpp::Unwrap(
reinterpret_cast<CefLabelButton*>(c)));
return reinterpret_cast<cef_view_t*>(
CefLabelButtonCToCpp::Unwrap(reinterpret_cast<CefLabelButton*>(c)));
}
if (type == WT_MENU_BUTTON) {
return reinterpret_cast<cef_view_t*>(CefMenuButtonCToCpp::Unwrap(
reinterpret_cast<CefMenuButton*>(c)));
return reinterpret_cast<cef_view_t*>(
CefMenuButtonCToCpp::Unwrap(reinterpret_cast<CefMenuButton*>(c)));
}
if (type == WT_PANEL) {
return reinterpret_cast<cef_view_t*>(CefPanelCToCpp::Unwrap(
reinterpret_cast<CefPanel*>(c)));
return reinterpret_cast<cef_view_t*>(
CefPanelCToCpp::Unwrap(reinterpret_cast<CefPanel*>(c)));
}
if (type == WT_SCROLL_VIEW) {
return reinterpret_cast<cef_view_t*>(CefScrollViewCToCpp::Unwrap(
reinterpret_cast<CefScrollView*>(c)));
return reinterpret_cast<cef_view_t*>(
CefScrollViewCToCpp::Unwrap(reinterpret_cast<CefScrollView*>(c)));
}
if (type == WT_TEXTFIELD) {
return reinterpret_cast<cef_view_t*>(CefTextfieldCToCpp::Unwrap(
reinterpret_cast<CefTextfield*>(c)));
return reinterpret_cast<cef_view_t*>(
CefTextfieldCToCpp::Unwrap(reinterpret_cast<CefTextfield*>(c)));
}
if (type == WT_WINDOW) {
return reinterpret_cast<cef_view_t*>(CefWindowCToCpp::Unwrap(
reinterpret_cast<CefWindow*>(c)));
return reinterpret_cast<cef_view_t*>(
CefWindowCToCpp::Unwrap(reinterpret_cast<CefWindow*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefViewCToCpp, CefView,
cef_view_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefViewCToCpp, CefView, cef_view_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefViewCToCpp, CefView,
cef_view_t>::kWrapperType = WT_VIEW;
template <>
CefWrapperType
CefCToCppRefCounted<CefViewCToCpp, CefView, cef_view_t>::kWrapperType =
WT_VIEW;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8a0511296741305bd92e37397a1587afc35565c2$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_
@@ -18,20 +20,20 @@
#error This file can be included wrapper-side only
#endif
#include "include/views/cef_view.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/views/cef_browser_view.h"
#include "include/capi/views/cef_browser_view_capi.h"
#include "include/views/cef_button.h"
#include "include/capi/views/cef_button_capi.h"
#include "include/views/cef_panel.h"
#include "include/capi/views/cef_panel_capi.h"
#include "include/views/cef_scroll_view.h"
#include "include/capi/views/cef_scroll_view_capi.h"
#include "include/views/cef_textfield.h"
#include "include/capi/views/cef_textfield_capi.h"
#include "include/views/cef_window.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_browser_view.h"
#include "include/views/cef_button.h"
#include "include/views/cef_panel.h"
#include "include/views/cef_scroll_view.h"
#include "include/views/cef_textfield.h"
#include "include/views/cef_view.h"
#include "include/views/cef_window.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=89d54d92898217240204511d1f90da18890f04ee$
//
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
@@ -19,7 +21,6 @@
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefSize CefViewDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
@@ -35,8 +36,8 @@ CefSize CefViewDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
@@ -55,8 +56,8 @@ CefSize CefViewDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
@@ -75,15 +76,15 @@ CefSize CefViewDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefViewDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
int width) {
cef_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -96,16 +97,16 @@ int CefViewDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefViewDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -122,14 +123,13 @@ void CefViewDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefViewDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -146,10 +146,8 @@ void CefViewDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefViewDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
@@ -165,8 +163,7 @@ void CefViewDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefViewDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
@@ -182,57 +179,61 @@ void CefViewDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefViewDelegateCToCpp::CefViewDelegateCToCpp() {
}
CefViewDelegateCToCpp::CefViewDelegateCToCpp() {}
template<> cef_view_delegate_t* CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate, cef_view_delegate_t>::UnwrapDerived(CefWrapperType type,
CefViewDelegate* c) {
template <>
cef_view_delegate_t*
CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate,
cef_view_delegate_t>::UnwrapDerived(CefWrapperType type,
CefViewDelegate* c) {
if (type == WT_BROWSER_VIEW_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefBrowserViewDelegateCToCpp::Unwrap(
reinterpret_cast<CefBrowserViewDelegate*>(c)));
reinterpret_cast<CefBrowserViewDelegate*>(c)));
}
if (type == WT_BUTTON_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefButtonDelegateCToCpp::Unwrap(reinterpret_cast<CefButtonDelegate*>(
c)));
CefButtonDelegateCToCpp::Unwrap(
reinterpret_cast<CefButtonDelegate*>(c)));
}
if (type == WT_MENU_BUTTON_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefMenuButtonDelegateCToCpp::Unwrap(
reinterpret_cast<CefMenuButtonDelegate*>(c)));
reinterpret_cast<CefMenuButtonDelegate*>(c)));
}
if (type == WT_PANEL_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefPanelDelegateCToCpp::Unwrap(reinterpret_cast<CefPanelDelegate*>(
c)));
CefPanelDelegateCToCpp::Unwrap(reinterpret_cast<CefPanelDelegate*>(c)));
}
if (type == WT_TEXTFIELD_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefTextfieldDelegateCToCpp::Unwrap(
reinterpret_cast<CefTextfieldDelegate*>(c)));
reinterpret_cast<CefTextfieldDelegate*>(c)));
}
if (type == WT_WINDOW_DELEGATE) {
return reinterpret_cast<cef_view_delegate_t*>(
CefWindowDelegateCToCpp::Unwrap(reinterpret_cast<CefWindowDelegate*>(
c)));
CefWindowDelegateCToCpp::Unwrap(
reinterpret_cast<CefWindowDelegate*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate, cef_view_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate,
cef_view_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate, cef_view_delegate_t>::kWrapperType = WT_VIEW_DELEGATE;
template <>
CefWrapperType CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate,
cef_view_delegate_t>::kWrapperType =
WT_VIEW_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=53be4f879079c7799cd42536e7e16e9b9d7a81a8$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_DELEGATE_CTOCPP_H_
@@ -18,17 +20,17 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_view_delegate.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/capi/views/cef_view_delegate_capi.h"
#include "include/views/cef_view.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/views/cef_view_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefViewDelegateCToCpp
: public CefCToCppRefCounted<CefViewDelegateCToCpp, CefViewDelegate,
cef_view_delegate_t> {
class CefViewDelegateCToCpp : public CefCToCppRefCounted<CefViewDelegateCToCpp,
CefViewDelegate,
cef_view_delegate_t> {
public:
CefViewDelegateCToCpp();
@@ -37,10 +39,12 @@ class CefViewDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,24 +9,25 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=89793d32af95e19caecc99078e0465e2b467ee6a$
//
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
#include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
#include "libcef_dll/ctocpp/views/display_ctocpp.h"
#include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
#include "libcef_dll/ctocpp/image_ctocpp.h"
#include "libcef_dll/ctocpp/views/layout_ctocpp.h"
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
#include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h"
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefWindow> CefWindow::CreateTopLevelWindow(
@@ -36,14 +37,13 @@ CefRefPtr<CefWindow> CefWindow::CreateTopLevelWindow(
// Unverified params: delegate
// Execute
cef_window_t* _retval = cef_window_create_top_level(
CefWindowDelegateCppToC::Wrap(delegate));
cef_window_t* _retval =
cef_window_create_top_level(CefWindowDelegateCppToC::Wrap(delegate));
// Return type: refptr_same
return CefWindowCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
void CefWindowCToCpp::Show() {
@@ -76,8 +76,7 @@ void CefWindowCToCpp::CenterWindow(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->center_window(_struct,
&size);
_struct->center_window(_struct, &size);
}
void CefWindowCToCpp::Close() {
@@ -102,7 +101,7 @@ bool CefWindowCToCpp::IsClosed() {
int _retval = _struct->is_closed(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::Activate() {
@@ -138,7 +137,7 @@ bool CefWindowCToCpp::IsActive() {
int _retval = _struct->is_active(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::BringToTop() {
@@ -160,8 +159,7 @@ void CefWindowCToCpp::SetAlwaysOnTop(bool on_top) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_always_on_top(_struct,
on_top);
_struct->set_always_on_top(_struct, on_top);
}
bool CefWindowCToCpp::IsAlwaysOnTop() {
@@ -175,7 +173,7 @@ bool CefWindowCToCpp::IsAlwaysOnTop() {
int _retval = _struct->is_always_on_top(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::Maximize() {
@@ -219,8 +217,7 @@ void CefWindowCToCpp::SetFullscreen(bool fullscreen) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_fullscreen(_struct,
fullscreen);
_struct->set_fullscreen(_struct, fullscreen);
}
bool CefWindowCToCpp::IsMaximized() {
@@ -234,7 +231,7 @@ bool CefWindowCToCpp::IsMaximized() {
int _retval = _struct->is_maximized(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsMinimized() {
@@ -248,7 +245,7 @@ bool CefWindowCToCpp::IsMinimized() {
int _retval = _struct->is_minimized(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsFullscreen() {
@@ -262,7 +259,7 @@ bool CefWindowCToCpp::IsFullscreen() {
int _retval = _struct->is_fullscreen(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::SetTitle(const CefString& title) {
@@ -275,8 +272,7 @@ void CefWindowCToCpp::SetTitle(const CefString& title) {
// Unverified params: title
// Execute
_struct->set_title(_struct,
title.GetStruct());
_struct->set_title(_struct, title.GetStruct());
}
CefString CefWindowCToCpp::GetTitle() {
@@ -308,8 +304,7 @@ void CefWindowCToCpp::SetWindowIcon(CefRefPtr<CefImage> image) {
return;
// Execute
_struct->set_window_icon(_struct,
CefImageCToCpp::Unwrap(image));
_struct->set_window_icon(_struct, CefImageCToCpp::Unwrap(image));
}
CefRefPtr<CefImage> CefWindowCToCpp::GetWindowIcon() {
@@ -339,8 +334,7 @@ void CefWindowCToCpp::SetWindowAppIcon(CefRefPtr<CefImage> image) {
return;
// Execute
_struct->set_window_app_icon(_struct,
CefImageCToCpp::Unwrap(image));
_struct->set_window_app_icon(_struct, CefImageCToCpp::Unwrap(image));
}
CefRefPtr<CefImage> CefWindowCToCpp::GetWindowAppIcon() {
@@ -358,8 +352,8 @@ CefRefPtr<CefImage> CefWindowCToCpp::GetWindowAppIcon() {
}
void CefWindowCToCpp::ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) {
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) {
cef_window_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, show_menu))
return;
@@ -372,10 +366,8 @@ void CefWindowCToCpp::ShowMenu(CefRefPtr<CefMenuModel> menu_model,
return;
// Execute
_struct->show_menu(_struct,
CefMenuModelCToCpp::Unwrap(menu_model),
&screen_point,
anchor_position);
_struct->show_menu(_struct, CefMenuModelCToCpp::Unwrap(menu_model),
&screen_point, anchor_position);
}
void CefWindowCToCpp::CancelMenu() {
@@ -441,13 +433,11 @@ void CefWindowCToCpp::SetDraggableRegions(
}
// Execute
_struct->set_draggable_regions(_struct,
regionsCount,
regionsList);
_struct->set_draggable_regions(_struct, regionsCount, regionsList);
// Restore param:regions; type: simple_vec_byref_const
if (regionsList)
delete [] regionsList;
delete[] regionsList;
}
CefWindowHandle CefWindowCToCpp::GetWindowHandle() {
@@ -472,9 +462,7 @@ void CefWindowCToCpp::SendKeyPress(int key_code, uint32 event_flags) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->send_key_press(_struct,
key_code,
event_flags);
_struct->send_key_press(_struct, key_code, event_flags);
}
void CefWindowCToCpp::SendMouseMove(int screen_x, int screen_y) {
@@ -485,13 +473,12 @@ void CefWindowCToCpp::SendMouseMove(int screen_x, int screen_y) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->send_mouse_move(_struct,
screen_x,
screen_y);
_struct->send_mouse_move(_struct, screen_x, screen_y);
}
void CefWindowCToCpp::SendMouseEvents(cef_mouse_button_type_t button,
bool mouse_down, bool mouse_up) {
bool mouse_down,
bool mouse_up) {
cef_window_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, send_mouse_events))
return;
@@ -499,14 +486,14 @@ void CefWindowCToCpp::SendMouseEvents(cef_mouse_button_type_t button,
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->send_mouse_events(_struct,
button,
mouse_down,
mouse_up);
_struct->send_mouse_events(_struct, button, mouse_down, mouse_up);
}
void CefWindowCToCpp::SetAccelerator(int command_id, int key_code,
bool shift_pressed, bool ctrl_pressed, bool alt_pressed) {
void CefWindowCToCpp::SetAccelerator(int command_id,
int key_code,
bool shift_pressed,
bool ctrl_pressed,
bool alt_pressed) {
cef_window_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_accelerator))
return;
@@ -514,12 +501,8 @@ void CefWindowCToCpp::SetAccelerator(int command_id, int key_code,
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_accelerator(_struct,
command_id,
key_code,
shift_pressed,
ctrl_pressed,
alt_pressed);
_struct->set_accelerator(_struct, command_id, key_code, shift_pressed,
ctrl_pressed, alt_pressed);
}
void CefWindowCToCpp::RemoveAccelerator(int command_id) {
@@ -530,8 +513,7 @@ void CefWindowCToCpp::RemoveAccelerator(int command_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->remove_accelerator(_struct,
command_id);
_struct->remove_accelerator(_struct, command_id);
}
void CefWindowCToCpp::RemoveAllAccelerators() {
@@ -582,8 +564,7 @@ CefRefPtr<CefBoxLayout> CefWindowCToCpp::SetToBoxLayout(
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_box_layout_t* _retval = _struct->set_to_box_layout(_struct,
&settings);
cef_box_layout_t* _retval = _struct->set_to_box_layout(_struct, &settings);
// Return type: refptr_same
return CefBoxLayoutCToCpp::Wrap(_retval);
@@ -627,8 +608,7 @@ void CefWindowCToCpp::AddChildView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->add_child_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->add_child_view(_struct, CefViewCToCpp::Unwrap(view));
}
void CefWindowCToCpp::AddChildViewAt(CefRefPtr<CefView> view, int index) {
@@ -648,9 +628,7 @@ void CefWindowCToCpp::AddChildViewAt(CefRefPtr<CefView> view, int index) {
return;
// Execute
_struct->add_child_view_at(_struct,
CefViewCToCpp::Unwrap(view),
index);
_struct->add_child_view_at(_struct, CefViewCToCpp::Unwrap(view), index);
}
void CefWindowCToCpp::ReorderChildView(CefRefPtr<CefView> view, int index) {
@@ -666,9 +644,7 @@ void CefWindowCToCpp::ReorderChildView(CefRefPtr<CefView> view, int index) {
return;
// Execute
_struct->reorder_child_view(_struct,
CefViewCToCpp::Unwrap(view),
index);
_struct->reorder_child_view(_struct, CefViewCToCpp::Unwrap(view), index);
}
void CefWindowCToCpp::RemoveChildView(CefRefPtr<CefView> view) {
@@ -684,8 +660,7 @@ void CefWindowCToCpp::RemoveChildView(CefRefPtr<CefView> view) {
return;
// Execute
_struct->remove_child_view(_struct,
CefViewCToCpp::Unwrap(view));
_struct->remove_child_view(_struct, CefViewCToCpp::Unwrap(view));
}
void CefWindowCToCpp::RemoveAllChildViews() {
@@ -726,8 +701,7 @@ CefRefPtr<CefView> CefWindowCToCpp::GetChildViewAt(int index) {
return NULL;
// Execute
cef_view_t* _retval = _struct->get_child_view_at(_struct,
index);
cef_view_t* _retval = _struct->get_child_view_at(_struct, index);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -827,8 +801,7 @@ CefString CefWindowCToCpp::ToString(bool include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = _struct->to_string(_struct,
include_children);
cef_string_userfree_t _retval = _struct->to_string(_struct, include_children);
// Return type: string
CefString _retvalStr;
@@ -847,7 +820,7 @@ bool CefWindowCToCpp::IsValid() {
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsAttached() {
@@ -861,7 +834,7 @@ bool CefWindowCToCpp::IsAttached() {
int _retval = _struct->is_attached(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsSame(CefRefPtr<CefView> that) {
@@ -877,11 +850,10 @@ bool CefWindowCToCpp::IsSame(CefRefPtr<CefView> that) {
return false;
// Execute
int _retval = _struct->is_same(_struct,
CefViewCToCpp::Unwrap(that));
int _retval = _struct->is_same(_struct, CefViewCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefRefPtr<CefViewDelegate> CefWindowCToCpp::GetDelegate() {
@@ -934,8 +906,7 @@ void CefWindowCToCpp::SetID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_id(_struct,
id);
_struct->set_id(_struct, id);
}
int CefWindowCToCpp::GetGroupID() {
@@ -960,8 +931,7 @@ void CefWindowCToCpp::SetGroupID(int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_group_id(_struct,
group_id);
_struct->set_group_id(_struct, group_id);
}
CefRefPtr<CefView> CefWindowCToCpp::GetParentView() {
@@ -986,8 +956,7 @@ CefRefPtr<CefView> CefWindowCToCpp::GetViewForID(int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_view_for_id(_struct,
id);
cef_view_t* _retval = _struct->get_view_for_id(_struct, id);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
@@ -1001,8 +970,7 @@ void CefWindowCToCpp::SetBounds(const CefRect& bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct,
&bounds);
_struct->set_bounds(_struct, &bounds);
}
CefRect CefWindowCToCpp::GetBounds() {
@@ -1041,8 +1009,7 @@ void CefWindowCToCpp::SetSize(const CefSize& size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct,
&size);
_struct->set_size(_struct, &size);
}
CefSize CefWindowCToCpp::GetSize() {
@@ -1067,8 +1034,7 @@ void CefWindowCToCpp::SetPosition(const CefPoint& position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct,
&position);
_struct->set_position(_struct, &position);
}
CefPoint CefWindowCToCpp::GetPosition() {
@@ -1146,8 +1112,7 @@ int CefWindowCToCpp::GetHeightForWidth(int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_height_for_width(_struct,
width);
int _retval = _struct->get_height_for_width(_struct, width);
// Return type: simple
return _retval;
@@ -1172,8 +1137,7 @@ void CefWindowCToCpp::SetVisible(bool visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct,
visible);
_struct->set_visible(_struct, visible);
}
bool CefWindowCToCpp::IsVisible() {
@@ -1187,7 +1151,7 @@ bool CefWindowCToCpp::IsVisible() {
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsDrawn() {
@@ -1201,7 +1165,7 @@ bool CefWindowCToCpp::IsDrawn() {
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::SetEnabled(bool enabled) {
@@ -1212,8 +1176,7 @@ void CefWindowCToCpp::SetEnabled(bool enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_enabled(_struct,
enabled);
_struct->set_enabled(_struct, enabled);
}
bool CefWindowCToCpp::IsEnabled() {
@@ -1227,7 +1190,7 @@ bool CefWindowCToCpp::IsEnabled() {
int _retval = _struct->is_enabled(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::SetFocusable(bool focusable) {
@@ -1238,8 +1201,7 @@ void CefWindowCToCpp::SetFocusable(bool focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_focusable(_struct,
focusable);
_struct->set_focusable(_struct, focusable);
}
bool CefWindowCToCpp::IsFocusable() {
@@ -1253,7 +1215,7 @@ bool CefWindowCToCpp::IsFocusable() {
int _retval = _struct->is_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::IsAccessibilityFocusable() {
@@ -1267,7 +1229,7 @@ bool CefWindowCToCpp::IsAccessibilityFocusable() {
int _retval = _struct->is_accessibility_focusable(_struct);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
void CefWindowCToCpp::RequestFocus() {
@@ -1289,8 +1251,7 @@ void CefWindowCToCpp::SetBackgroundColor(cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_background_color(_struct,
color);
_struct->set_background_color(_struct, color);
}
cef_color_t CefWindowCToCpp::GetBackgroundColor() {
@@ -1315,11 +1276,10 @@ bool CefWindowCToCpp::ConvertPointToScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_screen(_struct,
&point);
int _retval = _struct->convert_point_to_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::ConvertPointFromScreen(CefPoint& point) {
@@ -1330,11 +1290,10 @@ bool CefWindowCToCpp::ConvertPointFromScreen(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_screen(_struct,
&point);
int _retval = _struct->convert_point_from_screen(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::ConvertPointToWindow(CefPoint& point) {
@@ -1345,11 +1304,10 @@ bool CefWindowCToCpp::ConvertPointToWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_to_window(_struct,
&point);
int _retval = _struct->convert_point_to_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::ConvertPointFromWindow(CefPoint& point) {
@@ -1360,15 +1318,14 @@ bool CefWindowCToCpp::ConvertPointFromWindow(CefPoint& point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->convert_point_from_window(_struct,
&point);
int _retval = _struct->convert_point_from_window(_struct, &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_to_view))
return false;
@@ -1381,16 +1338,15 @@ bool CefWindowCToCpp::ConvertPointToView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_to_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_to_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) {
CefPoint& point) {
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, convert_point_from_view))
return false;
@@ -1403,30 +1359,33 @@ bool CefWindowCToCpp::ConvertPointFromView(CefRefPtr<CefView> view,
return false;
// Execute
int _retval = _struct->convert_point_from_view(_struct,
CefViewCToCpp::Unwrap(view),
&point);
int _retval = _struct->convert_point_from_view(
_struct, CefViewCToCpp::Unwrap(view), &point);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefWindowCToCpp::CefWindowCToCpp() {
}
CefWindowCToCpp::CefWindowCToCpp() {}
template<> cef_window_t* CefCToCppRefCounted<CefWindowCToCpp, CefWindow,
cef_window_t>::UnwrapDerived(CefWrapperType type, CefWindow* c) {
template <>
cef_window_t*
CefCToCppRefCounted<CefWindowCToCpp, CefWindow, cef_window_t>::UnwrapDerived(
CefWrapperType type,
CefWindow* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefWindowCToCpp, CefWindow,
cef_window_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCToCppRefCounted<CefWindowCToCpp, CefWindow, cef_window_t>::DebugObjCt =
0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefWindowCToCpp, CefWindow,
cef_window_t>::kWrapperType = WT_WINDOW;
template <>
CefWrapperType CefCToCppRefCounted<CefWindowCToCpp, CefWindow, cef_window_t>::
kWrapperType = WT_WINDOW;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=88ac661252337963a1857c77a4f103a377874b01$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_
@@ -19,8 +21,8 @@
#endif
#include <vector>
#include "include/views/cef_window.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_window.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
@@ -56,8 +58,8 @@ class CefWindowCToCpp
void SetWindowAppIcon(CefRefPtr<CefImage> image) OVERRIDE;
CefRefPtr<CefImage> GetWindowAppIcon() OVERRIDE;
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) OVERRIDE;
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) OVERRIDE;
void CancelMenu() OVERRIDE;
CefRefPtr<CefDisplay> GetDisplay() OVERRIDE;
CefRect GetClientAreaBoundsInScreen() OVERRIDE;
@@ -66,10 +68,14 @@ class CefWindowCToCpp
CefWindowHandle GetWindowHandle() OVERRIDE;
void SendKeyPress(int key_code, uint32 event_flags) OVERRIDE;
void SendMouseMove(int screen_x, int screen_y) OVERRIDE;
void SendMouseEvents(cef_mouse_button_type_t button, bool mouse_down,
bool mouse_up) OVERRIDE;
void SetAccelerator(int command_id, int key_code, bool shift_pressed,
bool ctrl_pressed, bool alt_pressed) OVERRIDE;
void SendMouseEvents(cef_mouse_button_type_t button,
bool mouse_down,
bool mouse_up) OVERRIDE;
void SetAccelerator(int command_id,
int key_code,
bool shift_pressed,
bool ctrl_pressed,
bool alt_pressed) OVERRIDE;
void RemoveAccelerator(int command_id) OVERRIDE;
void RemoveAllAccelerators() OVERRIDE;

View File

@@ -9,12 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6427d6295c6219f21468ed99bf20e4d3eddfe83b$
//
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefWindowDelegateCToCpp::OnWindowCreated(CefRefPtr<CefWindow> window) {
@@ -30,8 +31,7 @@ void CefWindowDelegateCToCpp::OnWindowCreated(CefRefPtr<CefWindow> window) {
return;
// Execute
_struct->on_window_created(_struct,
CefWindowCppToC::Wrap(window));
_struct->on_window_created(_struct, CefWindowCppToC::Wrap(window));
}
void CefWindowDelegateCToCpp::OnWindowDestroyed(CefRefPtr<CefWindow> window) {
@@ -47,8 +47,7 @@ void CefWindowDelegateCToCpp::OnWindowDestroyed(CefRefPtr<CefWindow> window) {
return;
// Execute
_struct->on_window_destroyed(_struct,
CefWindowCppToC::Wrap(window));
_struct->on_window_destroyed(_struct, CefWindowCppToC::Wrap(window));
}
bool CefWindowDelegateCToCpp::IsFrameless(CefRefPtr<CefWindow> window) {
@@ -64,11 +63,10 @@ bool CefWindowDelegateCToCpp::IsFrameless(CefRefPtr<CefWindow> window) {
return false;
// Execute
int _retval = _struct->is_frameless(_struct,
CefWindowCppToC::Wrap(window));
int _retval = _struct->is_frameless(_struct, CefWindowCppToC::Wrap(window));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::CanResize(CefRefPtr<CefWindow> window) {
@@ -84,11 +82,10 @@ bool CefWindowDelegateCToCpp::CanResize(CefRefPtr<CefWindow> window) {
return false;
// Execute
int _retval = _struct->can_resize(_struct,
CefWindowCppToC::Wrap(window));
int _retval = _struct->can_resize(_struct, CefWindowCppToC::Wrap(window));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::CanMaximize(CefRefPtr<CefWindow> window) {
@@ -104,11 +101,10 @@ bool CefWindowDelegateCToCpp::CanMaximize(CefRefPtr<CefWindow> window) {
return false;
// Execute
int _retval = _struct->can_maximize(_struct,
CefWindowCppToC::Wrap(window));
int _retval = _struct->can_maximize(_struct, CefWindowCppToC::Wrap(window));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::CanMinimize(CefRefPtr<CefWindow> window) {
@@ -124,11 +120,10 @@ bool CefWindowDelegateCToCpp::CanMinimize(CefRefPtr<CefWindow> window) {
return false;
// Execute
int _retval = _struct->can_minimize(_struct,
CefWindowCppToC::Wrap(window));
int _retval = _struct->can_minimize(_struct, CefWindowCppToC::Wrap(window));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::CanClose(CefRefPtr<CefWindow> window) {
@@ -144,15 +139,14 @@ bool CefWindowDelegateCToCpp::CanClose(CefRefPtr<CefWindow> window) {
return false;
// Execute
int _retval = _struct->can_close(_struct,
CefWindowCppToC::Wrap(window));
int _retval = _struct->can_close(_struct, CefWindowCppToC::Wrap(window));
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::OnAccelerator(CefRefPtr<CefWindow> window,
int command_id) {
int command_id) {
cef_window_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_accelerator))
return false;
@@ -165,16 +159,15 @@ bool CefWindowDelegateCToCpp::OnAccelerator(CefRefPtr<CefWindow> window,
return false;
// Execute
int _retval = _struct->on_accelerator(_struct,
CefWindowCppToC::Wrap(window),
command_id);
int _retval = _struct->on_accelerator(_struct, CefWindowCppToC::Wrap(window),
command_id);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
bool CefWindowDelegateCToCpp::OnKeyEvent(CefRefPtr<CefWindow> window,
const CefKeyEvent& event) {
const CefKeyEvent& event) {
cef_window_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_key_event))
return false;
@@ -187,17 +180,16 @@ bool CefWindowDelegateCToCpp::OnKeyEvent(CefRefPtr<CefWindow> window,
return false;
// Execute
int _retval = _struct->on_key_event(_struct,
CefWindowCppToC::Wrap(window),
&event);
int _retval =
_struct->on_key_event(_struct, CefWindowCppToC::Wrap(window), &event);
// Return type: bool
return _retval?true:false;
return _retval ? true : false;
}
CefSize CefWindowDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
return CefSize();
@@ -209,16 +201,16 @@ CefSize CefWindowDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_preferred_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefWindowDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
return CefSize();
@@ -230,16 +222,16 @@ CefSize CefWindowDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_minimum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
CefSize CefWindowDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
return CefSize();
@@ -251,17 +243,17 @@ CefSize CefWindowDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
// Execute
cef_size_t _retval = _struct->get_maximum_size(_struct,
CefViewCppToC::Wrap(view));
cef_size_t _retval =
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
// Return type: simple
return _retval;
}
int CefWindowDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
int width) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
int width) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
return 0;
@@ -273,18 +265,18 @@ int CefWindowDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
return 0;
// Execute
int _retval = _struct->get_height_for_width(_struct,
CefViewCppToC::Wrap(view),
width);
int _retval =
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
// Return type: simple
return _retval;
}
void CefWindowDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> parent) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
return;
@@ -300,16 +292,15 @@ void CefWindowDelegateCToCpp::OnParentViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_parent_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(parent));
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(parent));
}
void CefWindowDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
bool added, CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
bool added,
CefRefPtr<CefView> child) {
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
return;
@@ -325,15 +316,13 @@ void CefWindowDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
return;
// Execute
_struct->on_child_view_changed(_struct,
CefViewCppToC::Wrap(view),
added,
CefViewCppToC::Wrap(child));
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
CefViewCppToC::Wrap(child));
}
void CefWindowDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
@@ -345,13 +334,12 @@ void CefWindowDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
}
void CefWindowDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
@@ -363,28 +351,32 @@ void CefWindowDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.
CefWindowDelegateCToCpp::CefWindowDelegateCToCpp() {
}
CefWindowDelegateCToCpp::CefWindowDelegateCToCpp() {}
template<> cef_window_delegate_t* CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate, cef_window_delegate_t>::UnwrapDerived(
CefWrapperType type, CefWindowDelegate* c) {
template <>
cef_window_delegate_t* CefCToCppRefCounted<
CefWindowDelegateCToCpp,
CefWindowDelegate,
cef_window_delegate_t>::UnwrapDerived(CefWrapperType type,
CefWindowDelegate* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate, cef_window_delegate_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate,
cef_window_delegate_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate, cef_window_delegate_t>::kWrapperType =
template <>
CefWrapperType CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate,
cef_window_delegate_t>::kWrapperType =
WT_WINDOW_DELEGATE;

View File

@@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d6154885643d45eb81ecbd3a017776983a841651$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_
@@ -18,17 +20,18 @@
#error This file can be included DLL-side only
#endif
#include "include/views/cef_window_delegate.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/capi/views/cef_window_delegate_capi.h"
#include "include/views/cef_window.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_window_delegate.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefWindowDelegateCToCpp
: public CefCToCppRefCounted<CefWindowDelegateCToCpp, CefWindowDelegate,
cef_window_delegate_t> {
: public CefCToCppRefCounted<CefWindowDelegateCToCpp,
CefWindowDelegate,
cef_window_delegate_t> {
public:
CefWindowDelegateCToCpp();
@@ -42,7 +45,7 @@ class CefWindowDelegateCToCpp
bool CanClose(CefRefPtr<CefWindow> window) override;
bool OnAccelerator(CefRefPtr<CefWindow> window, int command_id) override;
bool OnKeyEvent(CefRefPtr<CefWindow> window,
const CefKeyEvent& event) override;
const CefKeyEvent& event) override;
// CefPanelDelegate methods.
@@ -51,10 +54,12 @@ class CefWindowDelegateCToCpp
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
CefSize GetMaximumSize(CefRefPtr<CefView> view) override;
int GetHeightForWidth(CefRefPtr<CefView> view, int width) override;
void OnParentViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view, bool added,
CefRefPtr<CefView> child) override;
void OnParentViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> parent) override;
void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};