- 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

@@ -652,7 +652,7 @@ enum cef_v8_propertyattribute_t
///
// Structure representing menu information.
///
typedef struct _cef_handler_menuinfo_t
typedef struct _cef_menu_info_t
{
///
// Values from the cef_handler_menutypebits_t enumeration.
@@ -679,13 +679,13 @@ typedef struct _cef_handler_menuinfo_t
int editFlags;
cef_string_t securityInfo;
} cef_handler_menuinfo_t;
} cef_menu_info_t;
///
// The cef_handler_menuinfo_t typeFlags value will be a combination of the
// The cef_menu_info_t typeFlags value will be a combination of the
// following values.
///
enum cef_handler_menutypebits_t
enum cef_menu_typebits_t
{
///
// No node is selected
@@ -730,10 +730,10 @@ enum cef_handler_menutypebits_t
};
///
// The cef_handler_menuinfo_t editFlags value will be a combination of the
// The cef_menu_info_t editFlags value will be a combination of the
// following values.
///
enum cef_handler_menucapabilitybits_t
enum cef_menu_capabilitybits_t
{
// Values from WebContextMenuData::EditFlags in WebContextMenuData.h
MENU_CAN_DO_NONE = 0x0,
@@ -753,7 +753,7 @@ enum cef_handler_menucapabilitybits_t
///
// Supported menu ID values.
///
enum cef_handler_menuid_t
enum cef_menu_id_t
{
MENU_ID_NAV_BACK = 10,
MENU_ID_NAV_FORWARD = 11,

View File

@@ -190,6 +190,25 @@ inline bool operator!=(const CefRect& a, const CefRect& b)
}
struct CefPrintOptionsTraits {
typedef cef_print_options_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
*target = *src;
}
};
///
// Class representing print options.
///
typedef CefStructBase<CefPrintOptionsTraits> CefPrintOptions;
struct CefPopupFeaturesTraits {
typedef cef_popup_features_t struct_type;
@@ -528,6 +547,53 @@ struct CefCookieTraits {
typedef CefStructBase<CefCookieTraits> CefCookie;
struct CefMenuInfoTraits {
typedef cef_menu_info_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
cef_string_clear(&s->linkUrl);
cef_string_clear(&s->imageUrl);
cef_string_clear(&s->pageUrl);
cef_string_clear(&s->frameUrl);
cef_string_clear(&s->selectionText);
cef_string_clear(&s->misspelledWord);
cef_string_clear(&s->securityInfo);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
target->typeFlags = src->typeFlags;
target->x = src->x;
target->y = src->y;
cef_string_set(src->linkUrl.str, src->linkUrl.length,
&target->linkUrl, copy);
cef_string_set(src->imageUrl.str, src->imageUrl.length,
&target->imageUrl, copy);
cef_string_set(src->pageUrl.str, src->pageUrl.length,
&target->pageUrl, copy);
cef_string_set(src->frameUrl.str, src->frameUrl.length,
&target->frameUrl, copy);
cef_string_set(src->selectionText.str, src->selectionText.length,
&target->selectionText, copy);
cef_string_set(src->misspelledWord.str, src->misspelledWord.length,
&target->misspelledWord, copy);
cef_string_set(src->securityInfo.str, src->securityInfo.length,
&target->securityInfo, copy);
target->editFlags = src->editFlags;
}
};
///
// Class representing menu info.
///
typedef CefStructBase<CefMenuInfoTraits> CefMenuInfo;
struct CefProxyInfoTraits {
typedef cef_proxy_info_t struct_type;