2018-01-03 21:46:26 +01:00
|
|
|
// Copyright (c) 2018 The Chromium Embedded Framework Authors. All rights
|
2016-01-19 21:09:01 +01:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2018-01-03 21:46:26 +01:00
|
|
|
// $hash=d92a04c8c718168beab8196c30b7922265a3272e$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
bool CefTextfieldDelegateCToCpp::OnKeyEvent(CefRefPtr<CefTextfield> textfield,
|
2017-05-17 11:29:28 +02:00
|
|
|
const CefKeyEvent& event) {
|
2016-01-19 21:09:01 +01:00
|
|
|
cef_textfield_delegate_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_key_event))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: textfield; type: refptr_diff
|
|
|
|
DCHECK(textfield.get());
|
|
|
|
if (!textfield.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_key_event(
|
|
|
|
_struct, CefTextfieldCppToC::Wrap(textfield), &event);
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefTextfieldDelegateCToCpp::OnAfterUserAction(
|
|
|
|
CefRefPtr<CefTextfield> textfield) {
|
|
|
|
cef_textfield_delegate_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_after_user_action))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: textfield; type: refptr_diff
|
|
|
|
DCHECK(textfield.get());
|
|
|
|
if (!textfield.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_after_user_action(_struct, CefTextfieldCppToC::Wrap(textfield));
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
CefSize CefTextfieldDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_preferred_size))
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_size_t _retval =
|
|
|
|
_struct->get_preferred_size(_struct, CefViewCppToC::Wrap(view));
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefSize CefTextfieldDelegateCToCpp::GetMinimumSize(CefRefPtr<CefView> view) {
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_minimum_size))
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_size_t _retval =
|
|
|
|
_struct->get_minimum_size(_struct, CefViewCppToC::Wrap(view));
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefSize CefTextfieldDelegateCToCpp::GetMaximumSize(CefRefPtr<CefView> view) {
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_maximum_size))
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return CefSize();
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_size_t _retval =
|
|
|
|
_struct->get_maximum_size(_struct, CefViewCppToC::Wrap(view));
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CefTextfieldDelegateCToCpp::GetHeightForWidth(CefRefPtr<CefView> view,
|
2017-05-17 11:29:28 +02:00
|
|
|
int width) {
|
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_height_for_width))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval =
|
|
|
|
_struct->get_height_for_width(_struct, CefViewCppToC::Wrap(view), width);
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CefTextfieldDelegateCToCpp::OnParentViewChanged(
|
|
|
|
CefRefPtr<CefView> view,
|
|
|
|
bool added,
|
|
|
|
CefRefPtr<CefView> parent) {
|
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_parent_view_changed))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return;
|
|
|
|
// Verify param: parent; type: refptr_diff
|
|
|
|
DCHECK(parent.get());
|
|
|
|
if (!parent.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_parent_view_changed(_struct, CefViewCppToC::Wrap(view), added,
|
|
|
|
CefViewCppToC::Wrap(parent));
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefTextfieldDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool added,
|
|
|
|
CefRefPtr<CefView> child) {
|
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2016-01-19 21:09:01 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_child_view_changed))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return;
|
|
|
|
// Verify param: child; type: refptr_diff
|
|
|
|
DCHECK(child.get());
|
|
|
|
if (!child.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_child_view_changed(_struct, CefViewCppToC::Wrap(view), added,
|
|
|
|
CefViewCppToC::Wrap(child));
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2017-02-18 03:08:51 +01:00
|
|
|
void CefTextfieldDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2017-02-18 03:08:51 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_focus))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_focus(_struct, CefViewCppToC::Wrap(view));
|
2017-02-18 03:08:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefTextfieldDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_view_delegate_t* _struct =
|
|
|
|
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
|
2017-02-18 03:08:51 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_blur))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: view; type: refptr_diff
|
|
|
|
DCHECK(view.get());
|
|
|
|
if (!view.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_blur(_struct, CefViewCppToC::Wrap(view));
|
2017-02-18 03:08:51 +01:00
|
|
|
}
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefTextfieldDelegateCToCpp::CefTextfieldDelegateCToCpp() {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_textfield_delegate_t* CefCToCppRefCounted<
|
|
|
|
CefTextfieldDelegateCToCpp,
|
|
|
|
CefTextfieldDelegate,
|
|
|
|
cef_textfield_delegate_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefTextfieldDelegate* c) {
|
2016-01-19 21:09:01 +01:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
base::AtomicRefCount CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
|
|
|
|
CefTextfieldDelegate,
|
2017-07-27 01:19:27 +02:00
|
|
|
cef_textfield_delegate_t>::DebugObjCt
|
|
|
|
ATOMIC_DECLARATION;
|
2016-01-19 21:09:01 +01:00
|
|
|
#endif
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefTextfieldDelegateCToCpp,
|
|
|
|
CefTextfieldDelegate,
|
|
|
|
cef_textfield_delegate_t>::kWrapperType =
|
2016-01-19 21:09:01 +01:00
|
|
|
WT_TEXTFIELD_DELEGATE;
|