2016-01-08 20:00:27 +01:00
|
|
|
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
2014-01-06 20:48:18 +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.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
#include "libcef_dll/ctocpp/stream_writer_ctocpp.h"
|
2014-01-06 20:48:18 +01:00
|
|
|
#include "libcef_dll/transfer_util.h"
|
|
|
|
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CefRefPtr<CefDragData> CefDragData::Create() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_drag_data_t* _retval = cef_drag_data_create();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefDragDataCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-01-06 20:48:18 +01:00
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
CefRefPtr<CefDragData> CefDragDataCToCpp::Clone() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, clone))
|
2014-07-01 00:30:29 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _retval = _struct->clone(_struct);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefDragDataCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefDragDataCToCpp::IsReadOnly() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_read_only))
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_read_only(_struct);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
2014-01-06 20:48:18 +01:00
|
|
|
bool CefDragDataCToCpp::IsLink() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_link))
|
2014-01-06 20:48:18 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_link(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefDragDataCToCpp::IsFragment() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_fragment))
|
2014-01-06 20:48:18 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_fragment(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefDragDataCToCpp::IsFile() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_file))
|
2014-01-06 20:48:18 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_file(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetLinkURL() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_link_url))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_link_url(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetLinkTitle() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_link_title))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_link_title(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetLinkMetadata() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_link_metadata))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_link_metadata(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetFragmentText() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_fragment_text))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_fragment_text(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetFragmentHtml() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_fragment_html))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_fragment_html(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetFragmentBaseURL() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_fragment_base_url))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_fragment_base_url(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefDragDataCToCpp::GetFileName() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_file_name))
|
2014-01-06 20:48:18 +01:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_file_name(_struct);
|
2014-01-06 20:48:18 +01:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
size_t CefDragDataCToCpp::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_file_contents))
|
2014-07-01 00:30:29 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: writer
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
size_t _retval = _struct->get_file_contents(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
CefStreamWriterCToCpp::Unwrap(writer));
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2014-01-06 20:48:18 +01:00
|
|
|
bool CefDragDataCToCpp::GetFileNames(std::vector<CefString>& names) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_file_names))
|
2014-01-06 20:48:18 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Translate param: names; type: string_vec_byref
|
|
|
|
cef_string_list_t namesList = cef_string_list_alloc();
|
|
|
|
DCHECK(namesList);
|
|
|
|
if (namesList)
|
|
|
|
transfer_string_list_contents(names, namesList);
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->get_file_names(_struct,
|
2014-01-06 20:48:18 +01:00
|
|
|
namesList);
|
|
|
|
|
|
|
|
// Restore param:names; type: string_vec_byref
|
|
|
|
if (namesList) {
|
|
|
|
names.clear();
|
|
|
|
transfer_string_list_contents(namesList, names);
|
|
|
|
cef_string_list_free(namesList);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
void CefDragDataCToCpp::SetLinkURL(const CefString& url) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_link_url))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: url
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_link_url(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
url.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::SetLinkTitle(const CefString& title) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_link_title))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: title
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_link_title(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
title.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::SetLinkMetadata(const CefString& data) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_link_metadata))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: data
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_link_metadata(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
data.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::SetFragmentText(const CefString& text) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_fragment_text))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: text
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_fragment_text(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
text.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::SetFragmentHtml(const CefString& html) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_fragment_html))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: html
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_fragment_html(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
html.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::SetFragmentBaseURL(const CefString& base_url) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_fragment_base_url))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: base_url
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_fragment_base_url(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
base_url.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::ResetFileContents() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, reset_file_contents))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->reset_file_contents(_struct);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefDragDataCToCpp::AddFile(const CefString& path,
|
|
|
|
const CefString& display_name) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_drag_data_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, add_file))
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: path; type: string_byref_const
|
|
|
|
DCHECK(!path.empty());
|
|
|
|
if (path.empty())
|
|
|
|
return;
|
|
|
|
// Unverified params: display_name
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->add_file(_struct,
|
2014-07-01 00:30:29 +02:00
|
|
|
path.GetStruct(),
|
|
|
|
display_name.GetStruct());
|
|
|
|
}
|
|
|
|
|
2014-01-06 20:48:18 +01:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefDragDataCToCpp::CefDragDataCToCpp() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> cef_drag_data_t* CefCToCpp<CefDragDataCToCpp, CefDragData,
|
|
|
|
cef_drag_data_t>::UnwrapDerived(CefWrapperType type, CefDragData* c) {
|
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2014-07-15 00:18:51 +02:00
|
|
|
template<> base::AtomicRefCount CefCToCpp<CefDragDataCToCpp, CefDragData,
|
2014-01-06 20:48:18 +01:00
|
|
|
cef_drag_data_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
template<> CefWrapperType CefCToCpp<CefDragDataCToCpp, CefDragData,
|
|
|
|
cef_drag_data_t>::kWrapperType = WT_DRAG_DATA;
|