- 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.
//
@ -18,171 +18,305 @@
CEF_EXPORT cef_command_line_t* cef_command_line_create()
{
CefRefPtr<CefCommandLine> impl = CefCommandLine::CreateCommandLine();
if(impl.get())
return CefCommandLineCppToC::Wrap(impl);
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefCommandLine> _retval = CefCommandLine::CreateCommandLine();
// Return type: refptr_same
return CefCommandLineCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK command_line_init_from_argv(struct _cef_command_line_t* self,
int argc, const char* const* argv)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: argv; type: simple_byaddr
DCHECK(argv);
if (!argv)
return;
CefCommandLineCppToC::Get(self)->InitFromArgv(argc, argv);
// Execute
CefCommandLineCppToC::Get(self)->InitFromArgv(
argc,
argv);
}
void CEF_CALLBACK command_line_init_from_string(
struct _cef_command_line_t* self, const cef_string_t* command_line)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: command_line; type: string_byref_const
DCHECK(command_line);
if (!command_line)
return;
CefCommandLineCppToC::Get(self)->InitFromString(CefString(command_line));
// Execute
CefCommandLineCppToC::Get(self)->InitFromString(
CefString(command_line));
}
cef_string_userfree_t CEF_CALLBACK command_line_get_command_line_string(
struct _cef_command_line_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
CefString str = CefCommandLineCppToC::Get(self)->GetCommandLineString();
return str.DetachToUserFree();
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetCommandLineString();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK command_line_get_program(
struct _cef_command_line_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
CefString str = CefCommandLineCppToC::Get(self)->GetProgram();
return str.DetachToUserFree();
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetProgram();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK command_line_set_program(struct _cef_command_line_t* self,
const cef_string_t* program)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: program; type: string_byref_const
DCHECK(program);
if (!program)
return;
CefCommandLineCppToC::Get(self)->SetProgram(CefString(program));
// Execute
CefCommandLineCppToC::Get(self)->SetProgram(
CefString(program));
}
int CEF_CALLBACK command_line_has_switches(struct _cef_command_line_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
return CefCommandLineCppToC::Get(self)->HasSwitches();
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitches();
// Return type: bool
return _retval;
}
int CEF_CALLBACK command_line_has_switch(struct _cef_command_line_t* self,
const cef_string_t* name)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!self || !name)
if (!name)
return 0;
return CefCommandLineCppToC::Get(self)->HasSwitch(CefString(name));
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitch(
CefString(name));
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK command_line_get_switch_value(
struct _cef_command_line_t* self, const cef_string_t* name)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!self || !name)
if (!name)
return NULL;
CefString str = CefCommandLineCppToC::Get(self)->GetSwitchValue(
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetSwitchValue(
CefString(name));
return str.DetachToUserFree();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK command_line_get_switches(struct _cef_command_line_t* self,
cef_string_map_t switches)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: switches; type: string_map_single_byref
DCHECK(switches);
if (!self || !switches)
if (!switches)
return;
CefCommandLine::SwitchMap map;
CefCommandLineCppToC::Get(self)->GetSwitches(map);
transfer_string_map_contents(map, switches);
// Translate param: switches; type: string_map_single_byref
std::map<CefString,CefString> switchesMap;
transfer_string_map_contents(switches, switchesMap);
// Execute
CefCommandLineCppToC::Get(self)->GetSwitches(
switchesMap);
// Restore param: switches; type: string_map_single_byref
cef_string_map_clear(switches);
transfer_string_map_contents(switchesMap, switches);
}
void CEF_CALLBACK command_line_append_switch(struct _cef_command_line_t* self,
const cef_string_t* name)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!self || !name)
if (!name)
return;
CefCommandLineCppToC::Get(self)->AppendSwitch(CefString(name));
// Execute
CefCommandLineCppToC::Get(self)->AppendSwitch(
CefString(name));
}
void CEF_CALLBACK command_line_append_switch_with_value(
struct _cef_command_line_t* self, const cef_string_t* name,
const cef_string_t* value)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return;
// Verify param: value; type: string_byref_const
DCHECK(value);
if (!self || !name || !value)
if (!value)
return;
CefCommandLineCppToC::Get(self)->AppendSwitchWithValue(CefString(name),
// Execute
CefCommandLineCppToC::Get(self)->AppendSwitchWithValue(
CefString(name),
CefString(value));
}
int CEF_CALLBACK command_line_has_arguments(struct _cef_command_line_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
return CefCommandLineCppToC::Get(self)->HasArguments();
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasArguments();
// Return type: bool
return _retval;
}
void CEF_CALLBACK command_line_get_arguments(struct _cef_command_line_t* self,
cef_string_list_t arguments)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: arguments; type: string_vec_byref
DCHECK(arguments);
if (!arguments)
return;
CefCommandLine::ArgumentList list;
CefCommandLineCppToC::Get(self)->GetArguments(list);
transfer_string_list_contents(list, arguments);
// Translate param: arguments; type: string_vec_byref
std::vector<CefString> argumentsList;
transfer_string_list_contents(arguments, argumentsList);
// Execute
CefCommandLineCppToC::Get(self)->GetArguments(
argumentsList);
// Restore param: arguments; type: string_vec_byref
cef_string_list_clear(arguments);
transfer_string_list_contents(argumentsList, arguments);
}
void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self,
const cef_string_t* argument)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: argument; type: string_byref_const
DCHECK(argument);
if (!self || !argument)
if (!argument)
return;
CefCommandLineCppToC::Get(self)->AppendArgument(CefString(argument));
// Execute
CefCommandLineCppToC::Get(self)->AppendArgument(
CefString(argument));
}
// CONSTRUCTOR - Do not edit by hand.
CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls)