mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add direct DOM access (issue #511).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@610 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
303
libcef_dll/cpptoc/domdocument_cpptoc.cc
Normal file
303
libcef_dll/cpptoc/domdocument_cpptoc.cc
Normal file
@ -0,0 +1,303 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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/cpptoc/domdocument_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
enum cef_dom_document_type_t CEF_CALLBACK domdocument_get_type(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return DOM_DOCUMENT_TYPE_UNKNOWN;
|
||||
|
||||
// Execute
|
||||
cef_dom_document_type_t _retval = CefDOMDocumentCppToC::Get(self)->GetType();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_document(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(self)->GetDocument(
|
||||
);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_body(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(self)->GetBody();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_head(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(self)->GetHead();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domdocument_get_title(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMDocumentCppToC::Get(self)->GetTitle();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_element_by_id(
|
||||
struct _cef_domdocument_t* self, const cef_string_t* id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: id; type: string_byref_const
|
||||
DCHECK(id);
|
||||
if (!id)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
|
||||
self)->GetElementById(
|
||||
CefString(id));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_focused_node(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
|
||||
self)->GetFocusedNode();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domdocument_has_selection(struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMDocumentCppToC::Get(self)->HasSelection();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_start_node(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
|
||||
self)->GetSelectionStartNode();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domdocument_get_selection_start_offset(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionStartOffset();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_end_node(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
|
||||
self)->GetSelectionEndNode();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domdocument_get_selection_end_offset(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionEndOffset();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domdocument_get_selection_as_markup(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionAsMarkup();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domdocument_get_selection_as_text(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionAsText();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domdocument_get_base_url(
|
||||
struct _cef_domdocument_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMDocumentCppToC::Get(self)->GetBaseURL();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domdocument_get_complete_url(
|
||||
struct _cef_domdocument_t* self, const cef_string_t* partialURL) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: partialURL; type: string_byref_const
|
||||
DCHECK(partialURL);
|
||||
if (!partialURL)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMDocumentCppToC::Get(self)->GetCompleteURL(
|
||||
CefString(partialURL));
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMDocumentCppToC::CefDOMDocumentCppToC(CefDOMDocument* cls)
|
||||
: CefCppToC<CefDOMDocumentCppToC, CefDOMDocument, cef_domdocument_t>(cls) {
|
||||
struct_.struct_.get_type = domdocument_get_type;
|
||||
struct_.struct_.get_document = domdocument_get_document;
|
||||
struct_.struct_.get_body = domdocument_get_body;
|
||||
struct_.struct_.get_head = domdocument_get_head;
|
||||
struct_.struct_.get_title = domdocument_get_title;
|
||||
struct_.struct_.get_element_by_id = domdocument_get_element_by_id;
|
||||
struct_.struct_.get_focused_node = domdocument_get_focused_node;
|
||||
struct_.struct_.has_selection = domdocument_has_selection;
|
||||
struct_.struct_.get_selection_start_node =
|
||||
domdocument_get_selection_start_node;
|
||||
struct_.struct_.get_selection_start_offset =
|
||||
domdocument_get_selection_start_offset;
|
||||
struct_.struct_.get_selection_end_node = domdocument_get_selection_end_node;
|
||||
struct_.struct_.get_selection_end_offset =
|
||||
domdocument_get_selection_end_offset;
|
||||
struct_.struct_.get_selection_as_markup = domdocument_get_selection_as_markup;
|
||||
struct_.struct_.get_selection_as_text = domdocument_get_selection_as_text;
|
||||
struct_.struct_.get_base_url = domdocument_get_base_url;
|
||||
struct_.struct_.get_complete_url = domdocument_get_complete_url;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
37
libcef_dll/cpptoc/domdocument_cpptoc.h
Normal file
37
libcef_dll/cpptoc/domdocument_cpptoc.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/capi/cef_dom_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefDOMDocumentCppToC
|
||||
: public CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t> {
|
||||
public:
|
||||
explicit CefDOMDocumentCppToC(CefDOMDocument* cls);
|
||||
virtual ~CefDOMDocumentCppToC() {}
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_
|
||||
|
159
libcef_dll/cpptoc/domevent_cpptoc.cc
Normal file
159
libcef_dll/cpptoc/domevent_cpptoc.cc
Normal file
@ -0,0 +1,159 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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/cpptoc/domdocument_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domevent_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domevent_get_type(
|
||||
struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMEventCppToC::Get(self)->GetType();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
enum cef_dom_event_category_t CEF_CALLBACK domevent_get_category(
|
||||
struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return DOM_EVENT_CATEGORY_UNKNOWN;
|
||||
|
||||
// Execute
|
||||
cef_dom_event_category_t _retval = CefDOMEventCppToC::Get(self)->GetCategory(
|
||||
);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
enum cef_dom_event_phase_t CEF_CALLBACK domevent_get_phase(
|
||||
struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return DOM_EVENT_PHASE_UNKNOWN;
|
||||
|
||||
// Execute
|
||||
cef_dom_event_phase_t _retval = CefDOMEventCppToC::Get(self)->GetPhase();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domevent_can_bubble(struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMEventCppToC::Get(self)->CanBubble();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domevent_can_cancel(struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMEventCppToC::Get(self)->CanCancel();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_domdocument_t* CEF_CALLBACK domevent_get_document(
|
||||
struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMDocument> _retval = CefDOMEventCppToC::Get(self)->GetDocument(
|
||||
);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMDocumentCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_domnode_t* CEF_CALLBACK domevent_get_target(struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMEventCppToC::Get(self)->GetTarget();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_domnode_t* CEF_CALLBACK domevent_get_current_target(
|
||||
struct _cef_domevent_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMEventCppToC::Get(
|
||||
self)->GetCurrentTarget();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMEventCppToC::CefDOMEventCppToC(CefDOMEvent* cls)
|
||||
: CefCppToC<CefDOMEventCppToC, CefDOMEvent, cef_domevent_t>(cls) {
|
||||
struct_.struct_.get_type = domevent_get_type;
|
||||
struct_.struct_.get_category = domevent_get_category;
|
||||
struct_.struct_.get_phase = domevent_get_phase;
|
||||
struct_.struct_.can_bubble = domevent_can_bubble;
|
||||
struct_.struct_.can_cancel = domevent_can_cancel;
|
||||
struct_.struct_.get_document = domevent_get_document;
|
||||
struct_.struct_.get_target = domevent_get_target;
|
||||
struct_.struct_.get_current_target = domevent_get_current_target;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMEventCppToC, CefDOMEvent,
|
||||
cef_domevent_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
36
libcef_dll/cpptoc/domevent_cpptoc.h
Normal file
36
libcef_dll/cpptoc/domevent_cpptoc.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/capi/cef_dom_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefDOMEventCppToC
|
||||
: public CefCppToC<CefDOMEventCppToC, CefDOMEvent, cef_domevent_t> {
|
||||
public:
|
||||
explicit CefDOMEventCppToC(CefDOMEvent* cls);
|
||||
virtual ~CefDOMEventCppToC() {}
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_
|
||||
|
49
libcef_dll/cpptoc/domevent_listener_cpptoc.cc
Normal file
49
libcef_dll/cpptoc/domevent_listener_cpptoc.cc
Normal file
@ -0,0 +1,49 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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/cpptoc/domevent_listener_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/domevent_ctocpp.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK domevent_listener_handle_event(
|
||||
struct _cef_domevent_listener_t* self, cef_domevent_t* event) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: event; type: refptr_diff
|
||||
DCHECK(event);
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefDOMEventListenerCppToC::Get(self)->HandleEvent(
|
||||
CefDOMEventCToCpp::Wrap(event));
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMEventListenerCppToC::CefDOMEventListenerCppToC(CefDOMEventListener* cls)
|
||||
: CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
|
||||
cef_domevent_listener_t>(cls) {
|
||||
struct_.struct_.handle_event = domevent_listener_handle_event;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
|
||||
cef_domevent_listener_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
37
libcef_dll/cpptoc/domevent_listener_cpptoc.h
Normal file
37
libcef_dll/cpptoc/domevent_listener_cpptoc.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/capi/cef_dom_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefDOMEventListenerCppToC
|
||||
: public CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
|
||||
cef_domevent_listener_t> {
|
||||
public:
|
||||
explicit CefDOMEventListenerCppToC(CefDOMEventListener* cls);
|
||||
virtual ~CefDOMEventListenerCppToC() {}
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_
|
||||
|
479
libcef_dll/cpptoc/domnode_cpptoc.cc
Normal file
479
libcef_dll/cpptoc/domnode_cpptoc.cc
Normal file
@ -0,0 +1,479 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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/cpptoc/domdocument_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/domevent_listener_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
enum cef_dom_node_type_t CEF_CALLBACK domnode_get_type(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return DOM_NODE_TYPE_UNSUPPORTED;
|
||||
|
||||
// Execute
|
||||
cef_dom_node_type_t _retval = CefDOMNodeCppToC::Get(self)->GetType();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_is_text(struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->IsText();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_is_element(struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->IsElement();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_is_form_control_element(struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->IsFormControlElement();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_form_control_element_type(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetFormControlElementType();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_is_same(struct _cef_domnode_t* self,
|
||||
struct _cef_domnode_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->IsSame(
|
||||
CefDOMNodeCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_name(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetName();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_value(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetValue();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_set_value(struct _cef_domnode_t* self,
|
||||
const cef_string_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: value; type: string_byref_const
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->SetValue(
|
||||
CefString(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_as_markup(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetAsMarkup();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_domdocument_t* CEF_CALLBACK domnode_get_document(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMDocument> _retval = CefDOMNodeCppToC::Get(self)->GetDocument(
|
||||
);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMDocumentCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domnode_get_parent(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetParent();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domnode_get_previous_sibling(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(
|
||||
self)->GetPreviousSibling();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domnode_get_next_sibling(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetNextSibling();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_has_children(struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->HasChildren();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domnode_get_first_child(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetFirstChild();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_domnode_t* CEF_CALLBACK domnode_get_last_child(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDOMNode> _retval = CefDOMNodeCppToC::Get(self)->GetLastChild();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDOMNodeCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK domnode_add_event_listener(struct _cef_domnode_t* self,
|
||||
const cef_string_t* eventType, struct _cef_domevent_listener_t* listener,
|
||||
int useCapture) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: eventType; type: string_byref_const
|
||||
DCHECK(eventType);
|
||||
if (!eventType)
|
||||
return;
|
||||
// Verify param: listener; type: refptr_diff
|
||||
DCHECK(listener);
|
||||
if (!listener)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefDOMNodeCppToC::Get(self)->AddEventListener(
|
||||
CefString(eventType),
|
||||
CefDOMEventListenerCToCpp::Wrap(listener),
|
||||
useCapture?true:false);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_element_tag_name(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementTagName();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_has_element_attributes(struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttributes();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_has_element_attribute(struct _cef_domnode_t* self,
|
||||
const cef_string_t* attrName) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: attrName; type: string_byref_const
|
||||
DCHECK(attrName);
|
||||
if (!attrName)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttribute(
|
||||
CefString(attrName));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_element_attribute(
|
||||
struct _cef_domnode_t* self, const cef_string_t* attrName) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: attrName; type: string_byref_const
|
||||
DCHECK(attrName);
|
||||
if (!attrName)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementAttribute(
|
||||
CefString(attrName));
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK domnode_get_element_attributes(struct _cef_domnode_t* self,
|
||||
cef_string_map_t attrMap) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: attrMap; type: string_map_single_byref
|
||||
DCHECK(attrMap);
|
||||
if (!attrMap)
|
||||
return;
|
||||
|
||||
// Translate param: attrMap; type: string_map_single_byref
|
||||
std::map<CefString, CefString> attrMapMap;
|
||||
transfer_string_map_contents(attrMap, attrMapMap);
|
||||
|
||||
// Execute
|
||||
CefDOMNodeCppToC::Get(self)->GetElementAttributes(
|
||||
attrMapMap);
|
||||
|
||||
// Restore param: attrMap; type: string_map_single_byref
|
||||
cef_string_map_clear(attrMap);
|
||||
transfer_string_map_contents(attrMapMap, attrMap);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK domnode_set_element_attribute(struct _cef_domnode_t* self,
|
||||
const cef_string_t* attrName, const cef_string_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: attrName; type: string_byref_const
|
||||
DCHECK(attrName);
|
||||
if (!attrName)
|
||||
return 0;
|
||||
// Verify param: value; type: string_byref_const
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDOMNodeCppToC::Get(self)->SetElementAttribute(
|
||||
CefString(attrName),
|
||||
CefString(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK domnode_get_element_inner_text(
|
||||
struct _cef_domnode_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementInnerText();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMNodeCppToC::CefDOMNodeCppToC(CefDOMNode* cls)
|
||||
: CefCppToC<CefDOMNodeCppToC, CefDOMNode, cef_domnode_t>(cls) {
|
||||
struct_.struct_.get_type = domnode_get_type;
|
||||
struct_.struct_.is_text = domnode_is_text;
|
||||
struct_.struct_.is_element = domnode_is_element;
|
||||
struct_.struct_.is_form_control_element = domnode_is_form_control_element;
|
||||
struct_.struct_.get_form_control_element_type =
|
||||
domnode_get_form_control_element_type;
|
||||
struct_.struct_.is_same = domnode_is_same;
|
||||
struct_.struct_.get_name = domnode_get_name;
|
||||
struct_.struct_.get_value = domnode_get_value;
|
||||
struct_.struct_.set_value = domnode_set_value;
|
||||
struct_.struct_.get_as_markup = domnode_get_as_markup;
|
||||
struct_.struct_.get_document = domnode_get_document;
|
||||
struct_.struct_.get_parent = domnode_get_parent;
|
||||
struct_.struct_.get_previous_sibling = domnode_get_previous_sibling;
|
||||
struct_.struct_.get_next_sibling = domnode_get_next_sibling;
|
||||
struct_.struct_.has_children = domnode_has_children;
|
||||
struct_.struct_.get_first_child = domnode_get_first_child;
|
||||
struct_.struct_.get_last_child = domnode_get_last_child;
|
||||
struct_.struct_.add_event_listener = domnode_add_event_listener;
|
||||
struct_.struct_.get_element_tag_name = domnode_get_element_tag_name;
|
||||
struct_.struct_.has_element_attributes = domnode_has_element_attributes;
|
||||
struct_.struct_.has_element_attribute = domnode_has_element_attribute;
|
||||
struct_.struct_.get_element_attribute = domnode_get_element_attribute;
|
||||
struct_.struct_.get_element_attributes = domnode_get_element_attributes;
|
||||
struct_.struct_.set_element_attribute = domnode_set_element_attribute;
|
||||
struct_.struct_.get_element_inner_text = domnode_get_element_inner_text;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
36
libcef_dll/cpptoc/domnode_cpptoc.h
Normal file
36
libcef_dll/cpptoc/domnode_cpptoc.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/capi/cef_dom_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefDOMNodeCppToC
|
||||
: public CefCppToC<CefDOMNodeCppToC, CefDOMNode, cef_domnode_t> {
|
||||
public:
|
||||
explicit CefDOMNodeCppToC(CefDOMNode* cls);
|
||||
virtual ~CefDOMNodeCppToC() {}
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_
|
||||
|
48
libcef_dll/cpptoc/domvisitor_cpptoc.cc
Normal file
48
libcef_dll/cpptoc/domvisitor_cpptoc.cc
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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/cpptoc/domvisitor_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/domdocument_ctocpp.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self,
|
||||
struct _cef_domdocument_t* document) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: document; type: refptr_diff
|
||||
DCHECK(document);
|
||||
if (!document)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefDOMVisitorCppToC::Get(self)->Visit(
|
||||
CefDOMDocumentCToCpp::Wrap(document));
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls)
|
||||
: CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t>(cls) {
|
||||
struct_.struct_.visit = domvisitor_visit;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
cef_domvisitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
36
libcef_dll/cpptoc/domvisitor_cpptoc.h
Normal file
36
libcef_dll/cpptoc/domvisitor_cpptoc.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/capi/cef_dom_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefDOMVisitorCppToC
|
||||
: public CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t> {
|
||||
public:
|
||||
explicit CefDOMVisitorCppToC(CefDOMVisitor* cls);
|
||||
virtual ~CefDOMVisitorCppToC() {}
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/domvisitor_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/string_visitor_ctocpp.h"
|
||||
|
||||
|
||||
@ -345,6 +346,23 @@ struct _cef_v8context_t* CEF_CALLBACK frame_get_v8context(
|
||||
return CefV8ContextCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK frame_visit_dom(struct _cef_frame_t* self,
|
||||
cef_domvisitor_t* visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor);
|
||||
if (!visitor)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefFrameCppToC::Get(self)->VisitDOM(
|
||||
CefDOMVisitorCToCpp::Wrap(visitor));
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
@ -373,6 +391,7 @@ CefFrameCppToC::CefFrameCppToC(CefFrame* cls)
|
||||
struct_.struct_.get_url = frame_get_url;
|
||||
struct_.struct_.get_browser = frame_get_browser;
|
||||
struct_.struct_.get_v8context = frame_get_v8context;
|
||||
struct_.struct_.visit_dom = frame_visit_dom;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user