- Auto-generate all C/C++ translation code (issue #33).

- Change index parameter types from int to size_t to make 0-based range implicit.
- Make CefPrintOptions and CefMenuInfo proper wrapper classes.
- Normalize the naming of menu-related types.
- Remove unused command_line variable from test_suite.cc.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@408 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-08 01:38:30 +00:00
parent b4653ce1da
commit 64e08c2918
238 changed files with 14703 additions and 4322 deletions

View File

@ -4,8 +4,8 @@
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// 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.
//
@ -19,196 +19,290 @@
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)
if (!self)
return DOM_DOCUMENT_TYPE_UNKNOWN;
return CefDOMDocumentCppToC::Get(self)->GetType();
// 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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> nodePtr =
CefDOMDocumentCppToC::Get(self)->GetDocument();
if (nodePtr.get())
return CefDOMNodeCppToC::Wrap(nodePtr);
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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> nodePtr = CefDOMDocumentCppToC::Get(self)->GetBody();
if (nodePtr.get())
return CefDOMNodeCppToC::Wrap(nodePtr);
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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> elementPtr = CefDOMDocumentCppToC::Get(self)->GetHead();
if (elementPtr.get())
return CefDOMNodeCppToC::Wrap(elementPtr);
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)
if (!self)
return NULL;
CefString str = CefDOMDocumentCppToC::Get(self)->GetTitle();
return str.DetachToUserFree();
// 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(!self || !id)
if (!id)
return NULL;
CefRefPtr<CefDOMNode> elementPtr =
CefDOMDocumentCppToC::Get(self)->GetElementById(CefString(id));
if (elementPtr.get())
return CefDOMNodeCppToC::Wrap(elementPtr);
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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> elementPtr =
CefDOMDocumentCppToC::Get(self)->GetFocusedNode();
if (elementPtr.get())
return CefDOMNodeCppToC::Wrap(elementPtr);
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)
if (!self)
return 0;
return CefDOMDocumentCppToC::Get(self)->HasSelection();
// 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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> elementPtr =
CefDOMDocumentCppToC::Get(self)->GetSelectionStartNode();
if (elementPtr.get())
return CefDOMNodeCppToC::Wrap(elementPtr);
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)
if (!self)
return 0;
return CefDOMDocumentCppToC::Get(self)->GetSelectionStartOffset();
// 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)
if (!self)
return NULL;
CefRefPtr<CefDOMNode> elementPtr =
CefDOMDocumentCppToC::Get(self)->GetSelectionEndNode();
if (elementPtr.get())
return CefDOMNodeCppToC::Wrap(elementPtr);
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)
if (!self)
return 0;
return CefDOMDocumentCppToC::Get(self)->GetSelectionEndOffset();
// 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)
if (!self)
return NULL;
CefString str = CefDOMDocumentCppToC::Get(self)->GetSelectionAsMarkup();
return str.DetachToUserFree();
// 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)
if (!self)
return NULL;
CefString str = CefDOMDocumentCppToC::Get(self)->GetSelectionAsText();
return str.DetachToUserFree();
// 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)
if (!self)
return NULL;
CefString str = CefDOMDocumentCppToC::Get(self)->GetBaseURL();
return str.DetachToUserFree();
// 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)
if (!self)
return NULL;
// Verify param: partialURL; type: string_byref_const
DCHECK(partialURL);
if (!partialURL)
return NULL;
CefString str =
CefDOMDocumentCppToC::Get(self)->GetCompleteURL(CefString(partialURL));
return str.DetachToUserFree();
// 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)