mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
|
||||
#elif defined(COMPILER_GCC)
|
||||
|
||||
#define CEF_EXPORT __attribute__ ((visibility("default")))
|
||||
#define CEF_EXPORT __attribute__((visibility("default")))
|
||||
|
||||
#endif // COMPILER_GCC
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
|
||||
#pragma once
|
||||
@@ -46,8 +45,9 @@ struct CefMainArgsTraits {
|
||||
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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->argc = src->argc;
|
||||
target->argv = src->argv;
|
||||
}
|
||||
@@ -73,8 +73,9 @@ struct CefWindowInfoTraits {
|
||||
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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->x = src->x;
|
||||
target->y = src->y;
|
||||
target->width = src->width;
|
||||
@@ -97,8 +98,7 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
///
|
||||
// Create the browser as a child window.
|
||||
///
|
||||
void SetAsChild(CefWindowHandle parent,
|
||||
const CefRect& windowRect) {
|
||||
void SetAsChild(CefWindowHandle parent, const CefRect& windowRect) {
|
||||
parent_window = parent;
|
||||
x = windowRect.x;
|
||||
y = windowRect.y;
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_MAC_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_MAC_H_
|
||||
#pragma once
|
||||
@@ -46,8 +45,9 @@ struct CefMainArgsTraits {
|
||||
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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->argc = src->argc;
|
||||
target->argv = src->argv;
|
||||
}
|
||||
@@ -76,10 +76,11 @@ struct CefWindowInfoTraits {
|
||||
cef_string_clear(&s->window_name);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
cef_string_set(src->window_name.str, src->window_name.length,
|
||||
&target->window_name, copy);
|
||||
&target->window_name, copy);
|
||||
target->x = src->x;
|
||||
target->y = src->y;
|
||||
target->width = src->width;
|
||||
@@ -103,8 +104,7 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
///
|
||||
// Create the browser as a child view.
|
||||
///
|
||||
void SetAsChild(CefWindowHandle parent, int x, int y, int width,
|
||||
int height) {
|
||||
void SetAsChild(CefWindowHandle parent, int x, int y, int width, int height) {
|
||||
parent_view = parent;
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_PTR_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_
|
||||
#pragma once
|
||||
@@ -159,7 +158,6 @@ using CefRefPtr = scoped_refptr<T>;
|
||||
#define CefRefPtr scoped_refptr
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A CefOwnPtr<T> is like a T*, except that the destructor of CefOwnPtr<T>
|
||||
// automatically deletes the pointer it holds (if any). That is, CefOwnPtr<T>
|
||||
@@ -181,7 +179,6 @@ using CefOwnPtr = scoped_ptr<T, D>;
|
||||
#define CefOwnPtr scoped_ptr
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A CefRawPtr<T> is the same as T*
|
||||
///
|
||||
@@ -218,9 +215,7 @@ class CefRawPtr {
|
||||
return *this;
|
||||
}
|
||||
|
||||
CefRawPtr<T>& operator=(const CefRawPtr<T>& r) {
|
||||
return *this = r.ptr_;
|
||||
}
|
||||
CefRawPtr<T>& operator=(const CefRawPtr<T>& r) { return *this = r.ptr_; }
|
||||
|
||||
template <typename U>
|
||||
CefRawPtr<T>& operator=(const CefRawPtr<U>& r) {
|
||||
|
@@ -44,7 +44,6 @@
|
||||
// Build with the wide string type as default.
|
||||
// #define CEF_STRING_TYPE_WIDE 1
|
||||
|
||||
|
||||
#include "include/internal/cef_string_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -58,7 +58,8 @@ CEF_EXPORT size_t cef_string_list_size(cef_string_list_t list);
|
||||
// true (1) if the value was successfully retrieved.
|
||||
///
|
||||
CEF_EXPORT int cef_string_list_value(cef_string_list_t list,
|
||||
size_t index, cef_string_t* value);
|
||||
size_t index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
// Append a new value at the end of the string list.
|
||||
|
@@ -63,13 +63,15 @@ CEF_EXPORT int cef_string_map_find(cef_string_map_t map,
|
||||
///
|
||||
// Return the key at the specified zero-based string map index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map, size_t index,
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map,
|
||||
size_t index,
|
||||
cef_string_t* key);
|
||||
|
||||
///
|
||||
// Return the value at the specified zero-based string map index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map, size_t index,
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map,
|
||||
size_t index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
@@ -89,7 +91,6 @@ CEF_EXPORT void cef_string_map_clear(cef_string_map_t map);
|
||||
///
|
||||
CEF_EXPORT void cef_string_map_free(cef_string_map_t map);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -58,7 +58,7 @@ CEF_EXPORT size_t cef_string_multimap_size(cef_string_multimap_t map);
|
||||
// Return the number of values with the specified key.
|
||||
///
|
||||
CEF_EXPORT size_t cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
const cef_string_t* key);
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Return the value_index-th value with the specified key.
|
||||
@@ -71,13 +71,15 @@ CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
|
||||
///
|
||||
// Return the key at the specified zero-based string multimap index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, size_t index,
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map,
|
||||
size_t index,
|
||||
cef_string_t* key);
|
||||
|
||||
///
|
||||
// Return the value at the specified zero-based string multimap index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, size_t index,
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map,
|
||||
size_t index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
@@ -97,7 +99,6 @@ CEF_EXPORT void cef_string_multimap_clear(cef_string_multimap_t map);
|
||||
///
|
||||
CEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -70,32 +70,35 @@ typedef struct _cef_string_utf16_t {
|
||||
void (*dtor)(char16* str);
|
||||
} cef_string_utf16_t;
|
||||
|
||||
|
||||
///
|
||||
// These functions set string values. If |copy| is true (1) the value will be
|
||||
// copied instead of referenced. It is up to the user to properly manage
|
||||
// the lifespan of references.
|
||||
///
|
||||
|
||||
CEF_EXPORT int cef_string_wide_set(const wchar_t* src, size_t src_len,
|
||||
cef_string_wide_t* output, int copy);
|
||||
CEF_EXPORT int cef_string_utf8_set(const char* src, size_t src_len,
|
||||
cef_string_utf8_t* output, int copy);
|
||||
CEF_EXPORT int cef_string_utf16_set(const char16* src, size_t src_len,
|
||||
cef_string_utf16_t* output, int copy);
|
||||
|
||||
CEF_EXPORT int cef_string_wide_set(const wchar_t* src,
|
||||
size_t src_len,
|
||||
cef_string_wide_t* output,
|
||||
int copy);
|
||||
CEF_EXPORT int cef_string_utf8_set(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_utf8_t* output,
|
||||
int copy);
|
||||
CEF_EXPORT int cef_string_utf16_set(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output,
|
||||
int copy);
|
||||
|
||||
///
|
||||
// Convenience macros for copying values.
|
||||
///
|
||||
|
||||
#define cef_string_wide_copy(src, src_len, output) \
|
||||
cef_string_wide_set(src, src_len, output, true)
|
||||
#define cef_string_utf8_copy(src, src_len, output) \
|
||||
cef_string_utf8_set(src, src_len, output, true)
|
||||
#define cef_string_utf16_copy(src, src_len, output) \
|
||||
cef_string_utf16_set(src, src_len, output, true)
|
||||
|
||||
#define cef_string_wide_copy(src, src_len, output) \
|
||||
cef_string_wide_set(src, src_len, output, true)
|
||||
#define cef_string_utf8_copy(src, src_len, output) \
|
||||
cef_string_utf8_set(src, src_len, output, true)
|
||||
#define cef_string_utf16_copy(src, src_len, output) \
|
||||
cef_string_utf16_set(src, src_len, output, true)
|
||||
|
||||
///
|
||||
// These functions clear string values. The structure itself is not freed.
|
||||
@@ -105,7 +108,6 @@ CEF_EXPORT void cef_string_wide_clear(cef_string_wide_t* str);
|
||||
CEF_EXPORT void cef_string_utf8_clear(cef_string_utf8_t* str);
|
||||
CEF_EXPORT void cef_string_utf16_clear(cef_string_utf16_t* str);
|
||||
|
||||
|
||||
///
|
||||
// These functions compare two string values with the same results as strcmp().
|
||||
///
|
||||
@@ -117,7 +119,6 @@ CEF_EXPORT int cef_string_utf8_cmp(const cef_string_utf8_t* str1,
|
||||
CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
|
||||
const cef_string_utf16_t* str2);
|
||||
|
||||
|
||||
///
|
||||
// These functions convert between UTF-8, -16, and -32 strings. They are
|
||||
// potentially slow so unnecessary conversions should be avoided. The best
|
||||
@@ -125,35 +126,40 @@ CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
|
||||
// value indicating whether the conversion is 100% valid.
|
||||
///
|
||||
|
||||
CEF_EXPORT int cef_string_wide_to_utf8(const wchar_t* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_wide_to_utf8(const wchar_t* src,
|
||||
size_t src_len,
|
||||
cef_string_utf8_t* output);
|
||||
CEF_EXPORT int cef_string_utf8_to_wide(const char* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf8_to_wide(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_wide_t* output);
|
||||
|
||||
CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output);
|
||||
CEF_EXPORT int cef_string_utf16_to_wide(const char16* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf16_to_wide(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_wide_t* output);
|
||||
|
||||
CEF_EXPORT int cef_string_utf8_to_utf16(const char* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf8_to_utf16(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output);
|
||||
CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf8_t* output);
|
||||
|
||||
|
||||
///
|
||||
// These functions convert an ASCII string, typically a hardcoded constant, to a
|
||||
// Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know
|
||||
// the string is ASCII.
|
||||
///
|
||||
|
||||
CEF_EXPORT int cef_string_ascii_to_wide(const char* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_ascii_to_wide(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_wide_t* output);
|
||||
CEF_EXPORT int cef_string_ascii_to_utf16(const char* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_ascii_to_utf16(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output);
|
||||
|
||||
|
||||
|
||||
///
|
||||
// It is sometimes necessary for the system to allocate string structures with
|
||||
// the expectation that the user will free them. The userfree types act as a
|
||||
@@ -164,7 +170,6 @@ typedef cef_string_wide_t* cef_string_userfree_wide_t;
|
||||
typedef cef_string_utf8_t* cef_string_userfree_utf8_t;
|
||||
typedef cef_string_utf16_t* cef_string_userfree_utf16_t;
|
||||
|
||||
|
||||
///
|
||||
// These functions allocate a new string structure. They must be freed by
|
||||
// calling the associated free function.
|
||||
@@ -174,7 +179,6 @@ CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc();
|
||||
CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc();
|
||||
CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc();
|
||||
|
||||
|
||||
///
|
||||
// These functions free the string structure allocated by the associated
|
||||
// alloc function. Any string contents will first be cleared.
|
||||
@@ -184,18 +188,18 @@ CEF_EXPORT void cef_string_userfree_wide_free(cef_string_userfree_wide_t str);
|
||||
CEF_EXPORT void cef_string_userfree_utf8_free(cef_string_userfree_utf8_t str);
|
||||
CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str);
|
||||
|
||||
|
||||
///
|
||||
// These functions convert utf16 string case using the current ICU locale. This
|
||||
// may change the length of the string in some cases.
|
||||
///
|
||||
|
||||
CEF_EXPORT int cef_string_utf16_to_lower(const char16* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf16_to_lower(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output);
|
||||
CEF_EXPORT int cef_string_utf16_to_upper(const char16* src, size_t src_len,
|
||||
CEF_EXPORT int cef_string_utf16_to_upper(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -49,9 +49,11 @@ struct CefStringTraitsWide {
|
||||
typedef cef_string_wide_t struct_type;
|
||||
typedef cef_string_userfree_wide_t userfree_struct_type;
|
||||
|
||||
static inline void clear(struct_type *s) { cef_string_wide_clear(s); }
|
||||
static inline int set(const char_type* src, size_t src_size,
|
||||
struct_type* output, int copy) {
|
||||
static inline void clear(struct_type* s) { cef_string_wide_clear(s); }
|
||||
static inline int set(const char_type* src,
|
||||
size_t src_size,
|
||||
struct_type* output,
|
||||
int copy) {
|
||||
return cef_string_wide_set(src, src_size, output, copy);
|
||||
}
|
||||
static inline int compare(const struct_type* s1, const struct_type* s2) {
|
||||
@@ -65,10 +67,10 @@ struct CefStringTraitsWide {
|
||||
}
|
||||
|
||||
// Conversion methods.
|
||||
static inline bool from_ascii(const char* str, size_t len, struct_type *s) {
|
||||
static inline bool from_ascii(const char* str, size_t len, struct_type* s) {
|
||||
return cef_string_ascii_to_wide(str, len, s) ? true : false;
|
||||
}
|
||||
static inline std::string to_string(const struct_type *s) {
|
||||
static inline std::string to_string(const struct_type* s) {
|
||||
cef_string_utf8_t cstr;
|
||||
memset(&cstr, 0, sizeof(cstr));
|
||||
cef_string_wide_to_utf8(s->str, s->length, &cstr);
|
||||
@@ -78,18 +80,18 @@ struct CefStringTraitsWide {
|
||||
cef_string_utf8_clear(&cstr);
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string(const std::string& str, struct_type *s) {
|
||||
static inline bool from_string(const std::string& str, struct_type* s) {
|
||||
return cef_string_utf8_to_wide(str.c_str(), str.length(), s) ? true : false;
|
||||
}
|
||||
static inline std::wstring to_wstring(const struct_type *s) {
|
||||
static inline std::wstring to_wstring(const struct_type* s) {
|
||||
return std::wstring(s->str, s->length);
|
||||
}
|
||||
static inline bool from_wstring(const std::wstring& str, struct_type *s) {
|
||||
return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
|
||||
true : false;
|
||||
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
|
||||
return cef_string_wide_set(str.c_str(), str.length(), s, true) ? true
|
||||
: false;
|
||||
}
|
||||
#if defined(WCHAR_T_IS_UTF32)
|
||||
static inline base::string16 to_string16(const struct_type *s) {
|
||||
static inline base::string16 to_string16(const struct_type* s) {
|
||||
cef_string_utf16_t cstr;
|
||||
memset(&cstr, 0, sizeof(cstr));
|
||||
cef_string_wide_to_utf16(s->str, s->length, &cstr);
|
||||
@@ -99,18 +101,17 @@ struct CefStringTraitsWide {
|
||||
cef_string_utf16_clear(&cstr);
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str,
|
||||
struct_type *s) {
|
||||
return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ?
|
||||
true : false;
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
}
|
||||
#else // WCHAR_T_IS_UTF32
|
||||
static inline base::string16 to_string16(const struct_type *s) {
|
||||
#else // WCHAR_T_IS_UTF32
|
||||
static inline base::string16 to_string16(const struct_type* s) {
|
||||
return base::string16(s->str, s->length);
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type *s) {
|
||||
return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
|
||||
true : false;
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_wide_set(str.c_str(), str.length(), s, true) ? true
|
||||
: false;
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
};
|
||||
@@ -123,9 +124,11 @@ struct CefStringTraitsUTF8 {
|
||||
typedef cef_string_utf8_t struct_type;
|
||||
typedef cef_string_userfree_utf8_t userfree_struct_type;
|
||||
|
||||
static inline void clear(struct_type *s) { cef_string_utf8_clear(s); }
|
||||
static inline int set(const char_type* src, size_t src_size,
|
||||
struct_type* output, int copy) {
|
||||
static inline void clear(struct_type* s) { cef_string_utf8_clear(s); }
|
||||
static inline int set(const char_type* src,
|
||||
size_t src_size,
|
||||
struct_type* output,
|
||||
int copy) {
|
||||
return cef_string_utf8_set(src, src_size, output, copy);
|
||||
}
|
||||
static inline int compare(const struct_type* s1, const struct_type* s2) {
|
||||
@@ -172,8 +175,8 @@ struct CefStringTraitsUTF8 {
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ?
|
||||
true : false;
|
||||
return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -185,9 +188,11 @@ struct CefStringTraitsUTF16 {
|
||||
typedef cef_string_utf16_t struct_type;
|
||||
typedef cef_string_userfree_utf16_t userfree_struct_type;
|
||||
|
||||
static inline void clear(struct_type *s) { cef_string_utf16_clear(s); }
|
||||
static inline int set(const char_type* src, size_t src_size,
|
||||
struct_type* output, int copy) {
|
||||
static inline void clear(struct_type* s) { cef_string_utf16_clear(s); }
|
||||
static inline int set(const char_type* src,
|
||||
size_t src_size,
|
||||
struct_type* output,
|
||||
int copy) {
|
||||
return cef_string_utf16_set(src, src_size, output, copy);
|
||||
}
|
||||
static inline int compare(const struct_type* s1, const struct_type* s2) {
|
||||
@@ -215,8 +220,8 @@ struct CefStringTraitsUTF16 {
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string(const std::string& str, struct_type* s) {
|
||||
return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ?
|
||||
true : false;
|
||||
return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
}
|
||||
#if defined(WCHAR_T_IS_UTF32)
|
||||
static inline std::wstring to_wstring(const struct_type* s) {
|
||||
@@ -230,24 +235,24 @@ struct CefStringTraitsUTF16 {
|
||||
return str;
|
||||
}
|
||||
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
|
||||
return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ?
|
||||
true : false;
|
||||
return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
}
|
||||
#else // WCHAR_T_IS_UTF32
|
||||
#else // WCHAR_T_IS_UTF32
|
||||
static inline std::wstring to_wstring(const struct_type* s) {
|
||||
return std::wstring(s->str, s->length);
|
||||
}
|
||||
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
|
||||
true : false;
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? true
|
||||
: false;
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
static inline base::string16 to_string16(const struct_type* s) {
|
||||
return base::string16(s->str, s->length);
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
|
||||
true : false;
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? true
|
||||
: false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -294,8 +299,7 @@ class CefStringBase {
|
||||
///
|
||||
// Create a new string from an existing string. Data will always be copied.
|
||||
///
|
||||
CefStringBase(const CefStringBase& str)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const CefStringBase& str) : string_(NULL), owner_(false) {
|
||||
FromString(str.c_str(), str.length(), true);
|
||||
}
|
||||
|
||||
@@ -304,12 +308,10 @@ class CefStringBase {
|
||||
// copied. Translation will occur if necessary based on the underlying string
|
||||
// type.
|
||||
///
|
||||
CefStringBase(const std::string& src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const std::string& src) : string_(NULL), owner_(false) {
|
||||
FromString(src);
|
||||
}
|
||||
CefStringBase(const char* src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const char* src) : string_(NULL), owner_(false) {
|
||||
if (src)
|
||||
FromString(std::string(src));
|
||||
}
|
||||
@@ -319,12 +321,10 @@ class CefStringBase {
|
||||
// copied. Translation will occur if necessary based on the underlying string
|
||||
// type.
|
||||
///
|
||||
CefStringBase(const std::wstring& src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const std::wstring& src) : string_(NULL), owner_(false) {
|
||||
FromWString(src);
|
||||
}
|
||||
CefStringBase(const wchar_t* src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const wchar_t* src) : string_(NULL), owner_(false) {
|
||||
if (src)
|
||||
FromWString(std::wstring(src));
|
||||
}
|
||||
@@ -335,12 +335,10 @@ class CefStringBase {
|
||||
// copied. Translation will occur if necessary based on the underlying string
|
||||
// type.
|
||||
///
|
||||
CefStringBase(const base::string16& src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const base::string16& src) : string_(NULL), owner_(false) {
|
||||
FromString16(src);
|
||||
}
|
||||
CefStringBase(const char16* src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const char16* src) : string_(NULL), owner_(false) {
|
||||
if (src)
|
||||
FromString16(base::string16(src));
|
||||
}
|
||||
@@ -353,7 +351,7 @@ class CefStringBase {
|
||||
// and will not be freed by this class.
|
||||
///
|
||||
CefStringBase(const char_type* src, size_t src_len, bool copy)
|
||||
: string_(NULL), owner_(false) {
|
||||
: string_(NULL), owner_(false) {
|
||||
if (src && src_len > 0)
|
||||
FromString(src, src_len, copy);
|
||||
}
|
||||
@@ -363,8 +361,7 @@ class CefStringBase {
|
||||
// ownership. Referenced structures must exist for the lifetime of this class
|
||||
// and will not be freed by this class.
|
||||
///
|
||||
CefStringBase(const struct_type* src) // NOLINT(runtime/explicit)
|
||||
: string_(NULL), owner_(false) {
|
||||
CefStringBase(const struct_type* src) : string_(NULL), owner_(false) {
|
||||
if (!src)
|
||||
return;
|
||||
// Reference the existing structure without taking ownership.
|
||||
@@ -373,7 +370,6 @@ class CefStringBase {
|
||||
|
||||
virtual ~CefStringBase() { ClearAndFree(); }
|
||||
|
||||
|
||||
// The following methods are named for compatibility with the standard library
|
||||
// string template types.
|
||||
|
||||
@@ -430,7 +426,6 @@ class CefStringBase {
|
||||
str.owner_ = tmp_owner;
|
||||
}
|
||||
|
||||
|
||||
// The following methods are unique to CEF string template types.
|
||||
|
||||
///
|
||||
@@ -635,15 +630,11 @@ class CefStringBase {
|
||||
///
|
||||
// Comparison operator overloads.
|
||||
///
|
||||
bool operator<(const CefStringBase& str) const {
|
||||
return (compare(str) < 0);
|
||||
}
|
||||
bool operator<(const CefStringBase& str) const { return (compare(str) < 0); }
|
||||
bool operator<=(const CefStringBase& str) const {
|
||||
return (compare(str) <= 0);
|
||||
}
|
||||
bool operator>(const CefStringBase& str) const {
|
||||
return (compare(str) > 0);
|
||||
}
|
||||
bool operator>(const CefStringBase& str) const { return (compare(str) > 0); }
|
||||
bool operator>=(const CefStringBase& str) const {
|
||||
return (compare(str) >= 0);
|
||||
}
|
||||
@@ -661,9 +652,7 @@ class CefStringBase {
|
||||
FromString(str.c_str(), str.length(), true);
|
||||
return *this;
|
||||
}
|
||||
operator std::string() const {
|
||||
return ToString();
|
||||
}
|
||||
operator std::string() const { return ToString(); }
|
||||
CefStringBase& operator=(const std::string& str) {
|
||||
FromString(str);
|
||||
return *this;
|
||||
@@ -672,9 +661,7 @@ class CefStringBase {
|
||||
FromString(std::string(str));
|
||||
return *this;
|
||||
}
|
||||
operator std::wstring() const {
|
||||
return ToWString();
|
||||
}
|
||||
operator std::wstring() const { return ToWString(); }
|
||||
CefStringBase& operator=(const std::wstring& str) {
|
||||
FromWString(str);
|
||||
return *this;
|
||||
@@ -684,9 +671,7 @@ class CefStringBase {
|
||||
return *this;
|
||||
}
|
||||
#if defined(WCHAR_T_IS_UTF32)
|
||||
operator base::string16() const {
|
||||
return ToString16();
|
||||
}
|
||||
operator base::string16() const { return ToString16(); }
|
||||
CefStringBase& operator=(const base::string16& str) {
|
||||
FromString16(str);
|
||||
return *this;
|
||||
@@ -722,7 +707,6 @@ class CefStringBase {
|
||||
bool owner_;
|
||||
};
|
||||
|
||||
|
||||
typedef CefStringBase<CefStringTraitsWide> CefStringWide;
|
||||
typedef CefStringBase<CefStringTraitsUTF8> CefStringUTF8;
|
||||
typedef CefStringBase<CefStringTraitsUTF16> CefStringUTF16;
|
||||
|
@@ -69,7 +69,7 @@ typedef pthread_t cef_platform_thread_handle_t;
|
||||
// Returns the current platform thread handle.
|
||||
///
|
||||
CEF_EXPORT cef_platform_thread_handle_t
|
||||
cef_get_current_platform_thread_handle();
|
||||
cef_get_current_platform_thread_handle();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -35,8 +35,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
#include <time.h>
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
///
|
||||
// Time information. Values should always be in UTC.
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
|
||||
#pragma once
|
||||
@@ -48,36 +47,34 @@
|
||||
|
||||
// 32-bit ARGB color value, not premultiplied. The color components are always
|
||||
// in a known order. Equivalent to the SkColor type.
|
||||
typedef uint32 cef_color_t;
|
||||
typedef uint32 cef_color_t;
|
||||
|
||||
// Return the alpha byte from a cef_color_t value.
|
||||
#define CefColorGetA(color) (((color) >> 24) & 0xFF)
|
||||
#define CefColorGetA(color) (((color) >> 24) & 0xFF)
|
||||
// Return the red byte from a cef_color_t value.
|
||||
#define CefColorGetR(color) (((color) >> 16) & 0xFF)
|
||||
#define CefColorGetR(color) (((color) >> 16) & 0xFF)
|
||||
// Return the green byte from a cef_color_t value.
|
||||
#define CefColorGetG(color) (((color) >> 8) & 0xFF)
|
||||
#define CefColorGetG(color) (((color) >> 8) & 0xFF)
|
||||
// Return the blue byte from a cef_color_t value.
|
||||
#define CefColorGetB(color) (((color) >> 0) & 0xFF)
|
||||
#define CefColorGetB(color) (((color) >> 0) & 0xFF)
|
||||
|
||||
// Return an cef_color_t value with the specified byte component values.
|
||||
#define CefColorSetARGB(a, r, g, b) \
|
||||
static_cast<cef_color_t>( \
|
||||
(static_cast<unsigned>(a) << 24) | \
|
||||
(static_cast<unsigned>(r) << 16) | \
|
||||
(static_cast<unsigned>(g) << 8) | \
|
||||
(static_cast<unsigned>(b) << 0))
|
||||
#define CefColorSetARGB(a, r, g, b) \
|
||||
static_cast<cef_color_t>( \
|
||||
(static_cast<unsigned>(a) << 24) | (static_cast<unsigned>(r) << 16) | \
|
||||
(static_cast<unsigned>(g) << 8) | (static_cast<unsigned>(b) << 0))
|
||||
|
||||
// Return an int64 value with the specified low and high int32 component values.
|
||||
#define CefInt64Set(int32_low, int32_high) \
|
||||
static_cast<int64>((static_cast<uint32>(int32_low)) | \
|
||||
(static_cast<int64>(static_cast<int32>(int32_high))) << 32)
|
||||
#define CefInt64Set(int32_low, int32_high) \
|
||||
static_cast<int64>((static_cast<uint32>(int32_low)) | \
|
||||
(static_cast<int64>(static_cast<int32>(int32_high))) \
|
||||
<< 32)
|
||||
|
||||
// Return the low int32 value from an int64 value.
|
||||
#define CefInt64GetLow(int64_val) static_cast<int32>(int64_val)
|
||||
// Return the high int32 value from an int64 value.
|
||||
#define CefInt64GetHigh(int64_val) \
|
||||
static_cast<int32>((static_cast<int64>(int64_val) >> 32) & 0xFFFFFFFFL)
|
||||
|
||||
static_cast<int32>((static_cast<int64>(int64_val) >> 32) & 0xFFFFFFFFL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -979,23 +976,23 @@ typedef enum {
|
||||
// DragActions.h and should not be renumbered.
|
||||
///
|
||||
typedef enum {
|
||||
DRAG_OPERATION_NONE = 0,
|
||||
DRAG_OPERATION_COPY = 1,
|
||||
DRAG_OPERATION_LINK = 2,
|
||||
DRAG_OPERATION_GENERIC = 4,
|
||||
DRAG_OPERATION_PRIVATE = 8,
|
||||
DRAG_OPERATION_MOVE = 16,
|
||||
DRAG_OPERATION_DELETE = 32,
|
||||
DRAG_OPERATION_EVERY = UINT_MAX
|
||||
DRAG_OPERATION_NONE = 0,
|
||||
DRAG_OPERATION_COPY = 1,
|
||||
DRAG_OPERATION_LINK = 2,
|
||||
DRAG_OPERATION_GENERIC = 4,
|
||||
DRAG_OPERATION_PRIVATE = 8,
|
||||
DRAG_OPERATION_MOVE = 16,
|
||||
DRAG_OPERATION_DELETE = 32,
|
||||
DRAG_OPERATION_EVERY = UINT_MAX
|
||||
} cef_drag_operations_mask_t;
|
||||
|
||||
///
|
||||
// V8 access control values.
|
||||
///
|
||||
typedef enum {
|
||||
V8_ACCESS_CONTROL_DEFAULT = 0,
|
||||
V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
|
||||
V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
|
||||
V8_ACCESS_CONTROL_DEFAULT = 0,
|
||||
V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
|
||||
V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
|
||||
V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2
|
||||
} cef_v8_accesscontrol_t;
|
||||
|
||||
@@ -1003,18 +1000,18 @@ typedef enum {
|
||||
// V8 property attribute values.
|
||||
///
|
||||
typedef enum {
|
||||
V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
|
||||
// Configurable
|
||||
V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable
|
||||
V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable
|
||||
V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 // Not configurable
|
||||
V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
|
||||
// Configurable
|
||||
V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable
|
||||
V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable
|
||||
V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 // Not configurable
|
||||
} cef_v8_propertyattribute_t;
|
||||
|
||||
///
|
||||
// Post data elements may represent either bytes or files.
|
||||
///
|
||||
typedef enum {
|
||||
PDE_TYPE_EMPTY = 0,
|
||||
PDE_TYPE_EMPTY = 0,
|
||||
PDE_TYPE_BYTES,
|
||||
PDE_TYPE_FILE,
|
||||
} cef_postdataelement_type_t;
|
||||
@@ -1223,35 +1220,35 @@ typedef enum {
|
||||
///
|
||||
// Default behavior.
|
||||
///
|
||||
UR_FLAG_NONE = 0,
|
||||
UR_FLAG_NONE = 0,
|
||||
|
||||
///
|
||||
// If set the cache will be skipped when handling the request.
|
||||
///
|
||||
UR_FLAG_SKIP_CACHE = 1 << 0,
|
||||
UR_FLAG_SKIP_CACHE = 1 << 0,
|
||||
|
||||
///
|
||||
// If set user name, password, and cookies may be sent with the request, and
|
||||
// cookies may be saved from the response.
|
||||
///
|
||||
UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
|
||||
UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
|
||||
|
||||
///
|
||||
// If set upload progress events will be generated when a request has a body.
|
||||
///
|
||||
UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3,
|
||||
UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3,
|
||||
|
||||
///
|
||||
// If set the CefURLRequestClient::OnDownloadData method will not be called.
|
||||
///
|
||||
UR_FLAG_NO_DOWNLOAD_DATA = 1 << 6,
|
||||
UR_FLAG_NO_DOWNLOAD_DATA = 1 << 6,
|
||||
|
||||
///
|
||||
// If set 5XX redirect errors will be propagated to the observer instead of
|
||||
// automatically re-tried. This currently only applies for requests
|
||||
// originated in the browser process.
|
||||
///
|
||||
UR_FLAG_NO_RETRY_ON_5XX = 1 << 7,
|
||||
UR_FLAG_NO_RETRY_ON_5XX = 1 << 7,
|
||||
} cef_urlrequest_flags_t;
|
||||
|
||||
///
|
||||
@@ -1362,7 +1359,7 @@ typedef enum {
|
||||
// Existing thread IDs.
|
||||
///
|
||||
typedef enum {
|
||||
// BROWSER PROCESS THREADS -- Only available in the browser process.
|
||||
// BROWSER PROCESS THREADS -- Only available in the browser process.
|
||||
|
||||
///
|
||||
// The main thread in the browser. This will be the same as the main
|
||||
@@ -1402,7 +1399,7 @@ typedef enum {
|
||||
///
|
||||
TID_IO,
|
||||
|
||||
// RENDER PROCESS THREADS -- Only available in the render process.
|
||||
// RENDER PROCESS THREADS -- Only available in the render process.
|
||||
|
||||
///
|
||||
// The main thread in the renderer. Used for all WebKit and V8 interaction.
|
||||
@@ -1563,53 +1560,53 @@ typedef struct _cef_screen_info_t {
|
||||
///
|
||||
typedef enum {
|
||||
// Navigation.
|
||||
MENU_ID_BACK = 100,
|
||||
MENU_ID_FORWARD = 101,
|
||||
MENU_ID_RELOAD = 102,
|
||||
MENU_ID_RELOAD_NOCACHE = 103,
|
||||
MENU_ID_STOPLOAD = 104,
|
||||
MENU_ID_BACK = 100,
|
||||
MENU_ID_FORWARD = 101,
|
||||
MENU_ID_RELOAD = 102,
|
||||
MENU_ID_RELOAD_NOCACHE = 103,
|
||||
MENU_ID_STOPLOAD = 104,
|
||||
|
||||
// Editing.
|
||||
MENU_ID_UNDO = 110,
|
||||
MENU_ID_REDO = 111,
|
||||
MENU_ID_CUT = 112,
|
||||
MENU_ID_COPY = 113,
|
||||
MENU_ID_PASTE = 114,
|
||||
MENU_ID_DELETE = 115,
|
||||
MENU_ID_SELECT_ALL = 116,
|
||||
MENU_ID_UNDO = 110,
|
||||
MENU_ID_REDO = 111,
|
||||
MENU_ID_CUT = 112,
|
||||
MENU_ID_COPY = 113,
|
||||
MENU_ID_PASTE = 114,
|
||||
MENU_ID_DELETE = 115,
|
||||
MENU_ID_SELECT_ALL = 116,
|
||||
|
||||
// Miscellaneous.
|
||||
MENU_ID_FIND = 130,
|
||||
MENU_ID_PRINT = 131,
|
||||
MENU_ID_VIEW_SOURCE = 132,
|
||||
MENU_ID_FIND = 130,
|
||||
MENU_ID_PRINT = 131,
|
||||
MENU_ID_VIEW_SOURCE = 132,
|
||||
|
||||
// Spell checking word correction suggestions.
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
|
||||
MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
|
||||
MENU_ID_ADD_TO_DICTIONARY = 206,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
|
||||
MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
|
||||
MENU_ID_ADD_TO_DICTIONARY = 206,
|
||||
|
||||
// Custom menu items originating from the renderer process. For example,
|
||||
// plugin placeholder menu items or Flash menu items.
|
||||
MENU_ID_CUSTOM_FIRST = 220,
|
||||
MENU_ID_CUSTOM_LAST = 250,
|
||||
MENU_ID_CUSTOM_FIRST = 220,
|
||||
MENU_ID_CUSTOM_LAST = 250,
|
||||
|
||||
// All user-defined menu IDs should come between MENU_ID_USER_FIRST and
|
||||
// MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
|
||||
// defined in the tools/gritsettings/resource_ids file.
|
||||
MENU_ID_USER_FIRST = 26500,
|
||||
MENU_ID_USER_LAST = 28500,
|
||||
MENU_ID_USER_FIRST = 26500,
|
||||
MENU_ID_USER_LAST = 28500,
|
||||
} cef_menu_id_t;
|
||||
|
||||
///
|
||||
// Mouse button types.
|
||||
///
|
||||
typedef enum {
|
||||
MBT_LEFT = 0,
|
||||
MBT_LEFT = 0,
|
||||
MBT_MIDDLE,
|
||||
MBT_RIGHT,
|
||||
} cef_mouse_button_type_t;
|
||||
@@ -1639,7 +1636,7 @@ typedef struct _cef_mouse_event_t {
|
||||
// Paint element types.
|
||||
///
|
||||
typedef enum {
|
||||
PET_VIEW = 0,
|
||||
PET_VIEW = 0,
|
||||
PET_POPUP,
|
||||
} cef_paint_element_type_t;
|
||||
|
||||
@@ -1647,20 +1644,20 @@ typedef enum {
|
||||
// Supported event bit flags.
|
||||
///
|
||||
typedef enum {
|
||||
EVENTFLAG_NONE = 0,
|
||||
EVENTFLAG_CAPS_LOCK_ON = 1 << 0,
|
||||
EVENTFLAG_SHIFT_DOWN = 1 << 1,
|
||||
EVENTFLAG_CONTROL_DOWN = 1 << 2,
|
||||
EVENTFLAG_ALT_DOWN = 1 << 3,
|
||||
EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4,
|
||||
EVENTFLAG_NONE = 0,
|
||||
EVENTFLAG_CAPS_LOCK_ON = 1 << 0,
|
||||
EVENTFLAG_SHIFT_DOWN = 1 << 1,
|
||||
EVENTFLAG_CONTROL_DOWN = 1 << 2,
|
||||
EVENTFLAG_ALT_DOWN = 1 << 3,
|
||||
EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4,
|
||||
EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5,
|
||||
EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6,
|
||||
EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6,
|
||||
// Mac OS-X command key.
|
||||
EVENTFLAG_COMMAND_DOWN = 1 << 7,
|
||||
EVENTFLAG_NUM_LOCK_ON = 1 << 8,
|
||||
EVENTFLAG_IS_KEY_PAD = 1 << 9,
|
||||
EVENTFLAG_IS_LEFT = 1 << 10,
|
||||
EVENTFLAG_IS_RIGHT = 1 << 11,
|
||||
EVENTFLAG_COMMAND_DOWN = 1 << 7,
|
||||
EVENTFLAG_NUM_LOCK_ON = 1 << 8,
|
||||
EVENTFLAG_IS_KEY_PAD = 1 << 9,
|
||||
EVENTFLAG_IS_LEFT = 1 << 10,
|
||||
EVENTFLAG_IS_RIGHT = 1 << 11,
|
||||
} cef_event_flags_t;
|
||||
|
||||
///
|
||||
@@ -1682,31 +1679,31 @@ typedef enum {
|
||||
///
|
||||
// No node is selected.
|
||||
///
|
||||
CM_TYPEFLAG_NONE = 0,
|
||||
CM_TYPEFLAG_NONE = 0,
|
||||
///
|
||||
// The top page is selected.
|
||||
///
|
||||
CM_TYPEFLAG_PAGE = 1 << 0,
|
||||
CM_TYPEFLAG_PAGE = 1 << 0,
|
||||
///
|
||||
// A subframe page is selected.
|
||||
///
|
||||
CM_TYPEFLAG_FRAME = 1 << 1,
|
||||
CM_TYPEFLAG_FRAME = 1 << 1,
|
||||
///
|
||||
// A link is selected.
|
||||
///
|
||||
CM_TYPEFLAG_LINK = 1 << 2,
|
||||
CM_TYPEFLAG_LINK = 1 << 2,
|
||||
///
|
||||
// A media node is selected.
|
||||
///
|
||||
CM_TYPEFLAG_MEDIA = 1 << 3,
|
||||
CM_TYPEFLAG_MEDIA = 1 << 3,
|
||||
///
|
||||
// There is a textual or mixed selection that is selected.
|
||||
///
|
||||
CM_TYPEFLAG_SELECTION = 1 << 4,
|
||||
CM_TYPEFLAG_SELECTION = 1 << 4,
|
||||
///
|
||||
// An editable element is selected.
|
||||
///
|
||||
CM_TYPEFLAG_EDITABLE = 1 << 5,
|
||||
CM_TYPEFLAG_EDITABLE = 1 << 5,
|
||||
} cef_context_menu_type_flags_t;
|
||||
|
||||
///
|
||||
@@ -1743,32 +1740,32 @@ typedef enum {
|
||||
// Supported context menu media state bit flags.
|
||||
///
|
||||
typedef enum {
|
||||
CM_MEDIAFLAG_NONE = 0,
|
||||
CM_MEDIAFLAG_ERROR = 1 << 0,
|
||||
CM_MEDIAFLAG_PAUSED = 1 << 1,
|
||||
CM_MEDIAFLAG_MUTED = 1 << 2,
|
||||
CM_MEDIAFLAG_LOOP = 1 << 3,
|
||||
CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
|
||||
CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
|
||||
CM_MEDIAFLAG_HAS_VIDEO = 1 << 6,
|
||||
CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7,
|
||||
CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
|
||||
CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
|
||||
CM_MEDIAFLAG_NONE = 0,
|
||||
CM_MEDIAFLAG_ERROR = 1 << 0,
|
||||
CM_MEDIAFLAG_PAUSED = 1 << 1,
|
||||
CM_MEDIAFLAG_MUTED = 1 << 2,
|
||||
CM_MEDIAFLAG_LOOP = 1 << 3,
|
||||
CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
|
||||
CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
|
||||
CM_MEDIAFLAG_HAS_VIDEO = 1 << 6,
|
||||
CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7,
|
||||
CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
|
||||
CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
|
||||
} cef_context_menu_media_state_flags_t;
|
||||
|
||||
///
|
||||
// Supported context menu edit state bit flags.
|
||||
///
|
||||
typedef enum {
|
||||
CM_EDITFLAG_NONE = 0,
|
||||
CM_EDITFLAG_CAN_UNDO = 1 << 0,
|
||||
CM_EDITFLAG_CAN_REDO = 1 << 1,
|
||||
CM_EDITFLAG_CAN_CUT = 1 << 2,
|
||||
CM_EDITFLAG_CAN_COPY = 1 << 3,
|
||||
CM_EDITFLAG_CAN_PASTE = 1 << 4,
|
||||
CM_EDITFLAG_CAN_DELETE = 1 << 5,
|
||||
CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
|
||||
CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
|
||||
CM_EDITFLAG_NONE = 0,
|
||||
CM_EDITFLAG_CAN_UNDO = 1 << 0,
|
||||
CM_EDITFLAG_CAN_REDO = 1 << 1,
|
||||
CM_EDITFLAG_CAN_CUT = 1 << 2,
|
||||
CM_EDITFLAG_CAN_COPY = 1 << 3,
|
||||
CM_EDITFLAG_CAN_PASTE = 1 << 4,
|
||||
CM_EDITFLAG_CAN_DELETE = 1 << 5,
|
||||
CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
|
||||
CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
|
||||
} cef_context_menu_edit_state_flags_t;
|
||||
|
||||
///
|
||||
@@ -2123,15 +2120,15 @@ typedef enum {
|
||||
COLOR_MODEL_RGB,
|
||||
COLOR_MODEL_RGB16,
|
||||
COLOR_MODEL_RGBA,
|
||||
COLOR_MODEL_COLORMODE_COLOR, // Used in samsung printer ppds.
|
||||
COLOR_MODEL_COLORMODE_MONOCHROME, // Used in samsung printer ppds.
|
||||
COLOR_MODEL_HP_COLOR_COLOR, // Used in HP color printer ppds.
|
||||
COLOR_MODEL_HP_COLOR_BLACK, // Used in HP color printer ppds.
|
||||
COLOR_MODEL_PRINTOUTMODE_NORMAL, // Used in foomatic ppds.
|
||||
COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY, // Used in foomatic ppds.
|
||||
COLOR_MODEL_PROCESSCOLORMODEL_CMYK, // Used in canon printer ppds.
|
||||
COLOR_MODEL_COLORMODE_COLOR, // Used in samsung printer ppds.
|
||||
COLOR_MODEL_COLORMODE_MONOCHROME, // Used in samsung printer ppds.
|
||||
COLOR_MODEL_HP_COLOR_COLOR, // Used in HP color printer ppds.
|
||||
COLOR_MODEL_HP_COLOR_BLACK, // Used in HP color printer ppds.
|
||||
COLOR_MODEL_PRINTOUTMODE_NORMAL, // Used in foomatic ppds.
|
||||
COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY, // Used in foomatic ppds.
|
||||
COLOR_MODEL_PROCESSCOLORMODEL_CMYK, // Used in canon printer ppds.
|
||||
COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE, // Used in canon printer ppds.
|
||||
COLOR_MODEL_PROCESSCOLORMODEL_RGB, // Used in canon printer ppds
|
||||
COLOR_MODEL_PROCESSCOLORMODEL_RGB, // Used in canon printer ppds
|
||||
} cef_color_model_t;
|
||||
|
||||
///
|
||||
@@ -2561,7 +2558,7 @@ typedef enum {
|
||||
// Transparency with pre-multiplied alpha component.
|
||||
///
|
||||
CEF_ALPHA_TYPE_PREMULTIPLIED,
|
||||
|
||||
|
||||
///
|
||||
// Transparency with post-multiplied alpha component.
|
||||
///
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
|
||||
#pragma once
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_
|
||||
#pragma once
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
|
||||
#pragma once
|
||||
@@ -54,9 +53,7 @@ extern "C" {
|
||||
///
|
||||
// Structure representing CefExecuteProcess arguments.
|
||||
///
|
||||
typedef struct _cef_main_args_t {
|
||||
HINSTANCE instance;
|
||||
} cef_main_args_t;
|
||||
typedef struct _cef_main_args_t { HINSTANCE instance; } cef_main_args_t;
|
||||
|
||||
///
|
||||
// Structure representing window information.
|
||||
|
@@ -43,9 +43,7 @@ class CefStructBase : public traits::struct_type {
|
||||
public:
|
||||
typedef typename traits::struct_type struct_type;
|
||||
|
||||
CefStructBase() : attached_to_(NULL) {
|
||||
Init();
|
||||
}
|
||||
CefStructBase() : attached_to_(NULL) { Init(); }
|
||||
virtual ~CefStructBase() {
|
||||
// Only clear this object's data if it isn't currently attached to a
|
||||
// structure.
|
||||
@@ -57,7 +55,7 @@ class CefStructBase : public traits::struct_type {
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefStructBase(const struct_type& r) { // NOLINT(runtime/explicit)
|
||||
CefStructBase(const struct_type& r) {
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
@@ -133,15 +131,15 @@ class CefStructBase : public traits::struct_type {
|
||||
struct_type* attached_to_;
|
||||
};
|
||||
|
||||
|
||||
struct CefPointTraits {
|
||||
typedef cef_point_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -154,16 +152,12 @@ class CefPoint : public CefStructBase<CefPointTraits> {
|
||||
typedef CefStructBase<CefPointTraits> parent;
|
||||
|
||||
CefPoint() : parent() {}
|
||||
CefPoint(const cef_point_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefPoint(const CefPoint& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefPoint(int x, int y) : parent() {
|
||||
Set(x, y);
|
||||
}
|
||||
CefPoint(const cef_point_t& r) : parent(r) {}
|
||||
CefPoint(const CefPoint& r) : parent(r) {}
|
||||
CefPoint(int x, int y) : parent() { Set(x, y); }
|
||||
|
||||
bool IsEmpty() const { return x <= 0 && y <= 0; }
|
||||
void Set(int x_val, int y_val) {
|
||||
x = x_val, y = y_val;
|
||||
}
|
||||
void Set(int x_val, int y_val) { x = x_val, y = y_val; }
|
||||
};
|
||||
|
||||
inline bool operator==(const CefPoint& a, const CefPoint& b) {
|
||||
@@ -174,15 +168,15 @@ inline bool operator!=(const CefPoint& a, const CefPoint& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefRectTraits {
|
||||
typedef cef_rect_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -195,8 +189,8 @@ class CefRect : public CefStructBase<CefRectTraits> {
|
||||
typedef CefStructBase<CefRectTraits> parent;
|
||||
|
||||
CefRect() : parent() {}
|
||||
CefRect(const cef_rect_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefRect(const CefRect& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefRect(const cef_rect_t& r) : parent(r) {}
|
||||
CefRect(const CefRect& r) : parent(r) {}
|
||||
CefRect(int x, int y, int width, int height) : parent() {
|
||||
Set(x, y, width, height);
|
||||
}
|
||||
@@ -226,15 +220,15 @@ inline bool operator!=(const CefRect& a, const CefRect& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefSizeTraits {
|
||||
typedef cef_size_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -247,11 +241,9 @@ class CefSize : public CefStructBase<CefSizeTraits> {
|
||||
typedef CefStructBase<CefSizeTraits> parent;
|
||||
|
||||
CefSize() : parent() {}
|
||||
CefSize(const cef_size_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefSize(const CefSize& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefSize(int width, int height) : parent() {
|
||||
Set(width, height);
|
||||
}
|
||||
CefSize(const cef_size_t& r) : parent(r) {}
|
||||
CefSize(const CefSize& r) : parent(r) {}
|
||||
CefSize(int width, int height) : parent() { Set(width, height); }
|
||||
|
||||
bool IsEmpty() const { return width <= 0 || height <= 0; }
|
||||
void Set(int width_val, int height_val) {
|
||||
@@ -267,15 +259,15 @@ inline bool operator!=(const CefSize& a, const CefSize& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefRangeTraits {
|
||||
typedef cef_range_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -288,17 +280,11 @@ class CefRange : public CefStructBase<CefRangeTraits> {
|
||||
typedef CefStructBase<CefRangeTraits> parent;
|
||||
|
||||
CefRange() : parent() {}
|
||||
CefRange(const cef_range_t& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefRange(const CefRange& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefRange(int from, int to) : parent() {
|
||||
Set(from, to);
|
||||
}
|
||||
CefRange(const cef_range_t& r) : parent(r) {}
|
||||
CefRange(const CefRange& r) : parent(r) {}
|
||||
CefRange(int from, int to) : parent() { Set(from, to); }
|
||||
|
||||
void Set(int from_val, int to_val) {
|
||||
from = from_val, to = to_val;
|
||||
}
|
||||
void Set(int from_val, int to_val) { from = from_val, to = to_val; }
|
||||
};
|
||||
|
||||
inline bool operator==(const CefRange& a, const CefRange& b) {
|
||||
@@ -309,15 +295,15 @@ inline bool operator!=(const CefRange& a, const CefRange& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefInsetsTraits {
|
||||
typedef cef_insets_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -330,8 +316,8 @@ class CefInsets : public CefStructBase<CefInsetsTraits> {
|
||||
typedef CefStructBase<CefInsetsTraits> parent;
|
||||
|
||||
CefInsets() : parent() {}
|
||||
CefInsets(const cef_insets_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefInsets(const CefInsets& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefInsets(const cef_insets_t& r) : parent(r) {}
|
||||
CefInsets(const CefInsets& r) : parent(r) {}
|
||||
CefInsets(int top, int left, int bottom, int right) : parent() {
|
||||
Set(top, left, bottom, right);
|
||||
}
|
||||
@@ -350,15 +336,15 @@ inline bool operator!=(const CefInsets& a, const CefInsets& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefDraggableRegionTraits {
|
||||
typedef cef_draggable_region_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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -371,10 +357,8 @@ class CefDraggableRegion : public CefStructBase<CefDraggableRegionTraits> {
|
||||
typedef CefStructBase<CefDraggableRegionTraits> parent;
|
||||
|
||||
CefDraggableRegion() : parent() {}
|
||||
CefDraggableRegion(const cef_draggable_region_t& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefDraggableRegion(const CefDraggableRegion& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefDraggableRegion(const cef_draggable_region_t& r) : parent(r) {}
|
||||
CefDraggableRegion(const CefDraggableRegion& r) : parent(r) {}
|
||||
CefDraggableRegion(const CefRect& bounds, bool draggable) : parent() {
|
||||
Set(bounds, draggable);
|
||||
}
|
||||
@@ -385,16 +369,15 @@ class CefDraggableRegion : public CefStructBase<CefDraggableRegionTraits> {
|
||||
};
|
||||
|
||||
inline bool operator==(const CefDraggableRegion& a,
|
||||
const CefDraggableRegion& b) {
|
||||
const CefDraggableRegion& b) {
|
||||
return a.bounds == b.bounds && a.draggable == b.draggable;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CefDraggableRegion& a,
|
||||
const CefDraggableRegion& b) {
|
||||
const CefDraggableRegion& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefScreenInfoTraits {
|
||||
typedef cef_screen_info_t struct_type;
|
||||
|
||||
@@ -402,8 +385,9 @@ struct CefScreenInfoTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->device_scale_factor = src->device_scale_factor;
|
||||
target->depth = src->depth;
|
||||
target->depth_per_component = src->depth_per_component;
|
||||
@@ -422,16 +406,17 @@ class CefScreenInfo : public CefStructBase<CefScreenInfoTraits> {
|
||||
typedef CefStructBase<CefScreenInfoTraits> parent;
|
||||
|
||||
CefScreenInfo() : parent() {}
|
||||
CefScreenInfo(const cef_screen_info_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefScreenInfo(const CefScreenInfo& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefScreenInfo(const cef_screen_info_t& r) : parent(r) {}
|
||||
CefScreenInfo(const CefScreenInfo& r) : parent(r) {}
|
||||
CefScreenInfo(float device_scale_factor,
|
||||
int depth,
|
||||
int depth_per_component,
|
||||
bool is_monochrome,
|
||||
const CefRect& rect,
|
||||
const CefRect& available_rect) : parent() {
|
||||
Set(device_scale_factor, depth, depth_per_component,
|
||||
is_monochrome, rect, available_rect);
|
||||
const CefRect& available_rect)
|
||||
: parent() {
|
||||
Set(device_scale_factor, depth, depth_per_component, is_monochrome, rect,
|
||||
available_rect);
|
||||
}
|
||||
|
||||
void Set(float device_scale_factor_val,
|
||||
@@ -449,7 +434,6 @@ class CefScreenInfo : public CefStructBase<CefScreenInfoTraits> {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct CefKeyEventTraits {
|
||||
typedef cef_key_event_t struct_type;
|
||||
|
||||
@@ -457,8 +441,9 @@ struct CefKeyEventTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->type = src->type;
|
||||
target->modifiers = src->modifiers;
|
||||
target->windows_key_code = src->windows_key_code;
|
||||
@@ -475,7 +460,6 @@ struct CefKeyEventTraits {
|
||||
///
|
||||
typedef CefStructBase<CefKeyEventTraits> CefKeyEvent;
|
||||
|
||||
|
||||
struct CefMouseEventTraits {
|
||||
typedef cef_mouse_event_t struct_type;
|
||||
|
||||
@@ -483,8 +467,9 @@ struct CefMouseEventTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->x = src->x;
|
||||
target->y = src->y;
|
||||
target->modifiers = src->modifiers;
|
||||
@@ -496,7 +481,6 @@ struct CefMouseEventTraits {
|
||||
///
|
||||
typedef CefStructBase<CefMouseEventTraits> CefMouseEvent;
|
||||
|
||||
|
||||
struct CefPopupFeaturesTraits {
|
||||
typedef cef_popup_features_t struct_type;
|
||||
|
||||
@@ -511,8 +495,9 @@ struct CefPopupFeaturesTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->x = src->x;
|
||||
target->xSet = src->xSet;
|
||||
target->y = src->y;
|
||||
@@ -537,13 +522,10 @@ struct CefPopupFeaturesTraits {
|
||||
///
|
||||
typedef CefStructBase<CefPopupFeaturesTraits> CefPopupFeatures;
|
||||
|
||||
|
||||
struct CefSettingsTraits {
|
||||
typedef cef_settings_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {
|
||||
s->size = sizeof(struct_type);
|
||||
}
|
||||
static inline void init(struct_type* s) { s->size = sizeof(struct_type); }
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
cef_string_clear(&s->browser_subprocess_path);
|
||||
@@ -560,44 +542,44 @@ struct CefSettingsTraits {
|
||||
cef_string_clear(&s->accept_language_list);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->single_process = src->single_process;
|
||||
target->no_sandbox = src->no_sandbox;
|
||||
cef_string_set(src->browser_subprocess_path.str,
|
||||
src->browser_subprocess_path.length,
|
||||
&target->browser_subprocess_path, copy);
|
||||
cef_string_set(src->framework_dir_path.str,
|
||||
src->framework_dir_path.length,
|
||||
&target->framework_dir_path, copy);
|
||||
src->browser_subprocess_path.length,
|
||||
&target->browser_subprocess_path, copy);
|
||||
cef_string_set(src->framework_dir_path.str, src->framework_dir_path.length,
|
||||
&target->framework_dir_path, copy);
|
||||
target->multi_threaded_message_loop = src->multi_threaded_message_loop;
|
||||
target->external_message_pump = src->external_message_pump;
|
||||
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
|
||||
target->command_line_args_disabled = src->command_line_args_disabled;
|
||||
|
||||
cef_string_set(src->cache_path.str, src->cache_path.length,
|
||||
&target->cache_path, copy);
|
||||
&target->cache_path, copy);
|
||||
cef_string_set(src->user_data_path.str, src->user_data_path.length,
|
||||
&target->user_data_path, copy);
|
||||
&target->user_data_path, copy);
|
||||
target->persist_session_cookies = src->persist_session_cookies;
|
||||
target->persist_user_preferences = src->persist_user_preferences;
|
||||
|
||||
cef_string_set(src->user_agent.str, src->user_agent.length,
|
||||
&target->user_agent, copy);
|
||||
&target->user_agent, copy);
|
||||
cef_string_set(src->product_version.str, src->product_version.length,
|
||||
&target->product_version, copy);
|
||||
&target->product_version, copy);
|
||||
cef_string_set(src->locale.str, src->locale.length, &target->locale, copy);
|
||||
|
||||
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
|
||||
copy);
|
||||
copy);
|
||||
target->log_severity = src->log_severity;
|
||||
cef_string_set(src->javascript_flags.str, src->javascript_flags.length,
|
||||
&target->javascript_flags, copy);
|
||||
&target->javascript_flags, copy);
|
||||
|
||||
cef_string_set(src->resources_dir_path.str, src->resources_dir_path.length,
|
||||
&target->resources_dir_path, copy);
|
||||
&target->resources_dir_path, copy);
|
||||
cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length,
|
||||
&target->locales_dir_path, copy);
|
||||
&target->locales_dir_path, copy);
|
||||
target->pack_loading_disabled = src->pack_loading_disabled;
|
||||
target->remote_debugging_port = src->remote_debugging_port;
|
||||
target->uncaught_exception_stack_size = src->uncaught_exception_stack_size;
|
||||
@@ -607,7 +589,8 @@ struct CefSettingsTraits {
|
||||
target->background_color = src->background_color;
|
||||
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length, &target->accept_language_list, copy);
|
||||
src->accept_language_list.length,
|
||||
&target->accept_language_list, copy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -616,30 +599,29 @@ struct CefSettingsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefSettingsTraits> CefSettings;
|
||||
|
||||
|
||||
struct CefRequestContextSettingsTraits {
|
||||
typedef cef_request_context_settings_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {
|
||||
s->size = sizeof(struct_type);
|
||||
}
|
||||
static inline void init(struct_type* s) { s->size = sizeof(struct_type); }
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
cef_string_clear(&s->cache_path);
|
||||
cef_string_clear(&s->accept_language_list);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
cef_string_set(src->cache_path.str, src->cache_path.length,
|
||||
&target->cache_path, copy);
|
||||
&target->cache_path, copy);
|
||||
target->persist_session_cookies = src->persist_session_cookies;
|
||||
target->persist_user_preferences = src->persist_user_preferences;
|
||||
target->ignore_certificate_errors = src->ignore_certificate_errors;
|
||||
target->enable_net_security_expiration =
|
||||
src->enable_net_security_expiration;
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length, &target->accept_language_list, copy);
|
||||
src->accept_language_list.length,
|
||||
&target->accept_language_list, copy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -649,13 +631,10 @@ struct CefRequestContextSettingsTraits {
|
||||
typedef CefStructBase<CefRequestContextSettingsTraits>
|
||||
CefRequestContextSettings;
|
||||
|
||||
|
||||
struct CefBrowserSettingsTraits {
|
||||
typedef cef_browser_settings_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {
|
||||
s->size = sizeof(struct_type);
|
||||
}
|
||||
static inline void init(struct_type* s) { s->size = sizeof(struct_type); }
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
cef_string_clear(&s->standard_font_family);
|
||||
@@ -668,23 +647,27 @@ struct CefBrowserSettingsTraits {
|
||||
cef_string_clear(&s->accept_language_list);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->windowless_frame_rate = src->windowless_frame_rate;
|
||||
|
||||
cef_string_set(src->standard_font_family.str,
|
||||
src->standard_font_family.length, &target->standard_font_family, copy);
|
||||
src->standard_font_family.length,
|
||||
&target->standard_font_family, copy);
|
||||
cef_string_set(src->fixed_font_family.str, src->fixed_font_family.length,
|
||||
&target->fixed_font_family, copy);
|
||||
&target->fixed_font_family, copy);
|
||||
cef_string_set(src->serif_font_family.str, src->serif_font_family.length,
|
||||
&target->serif_font_family, copy);
|
||||
&target->serif_font_family, copy);
|
||||
cef_string_set(src->sans_serif_font_family.str,
|
||||
src->sans_serif_font_family.length, &target->sans_serif_font_family,
|
||||
copy);
|
||||
src->sans_serif_font_family.length,
|
||||
&target->sans_serif_font_family, copy);
|
||||
cef_string_set(src->cursive_font_family.str,
|
||||
src->cursive_font_family.length, &target->cursive_font_family, copy);
|
||||
src->cursive_font_family.length,
|
||||
&target->cursive_font_family, copy);
|
||||
cef_string_set(src->fantasy_font_family.str,
|
||||
src->fantasy_font_family.length, &target->fantasy_font_family, copy);
|
||||
src->fantasy_font_family.length,
|
||||
&target->fantasy_font_family, copy);
|
||||
|
||||
target->default_font_size = src->default_font_size;
|
||||
target->default_fixed_font_size = src->default_fixed_font_size;
|
||||
@@ -692,7 +675,7 @@ struct CefBrowserSettingsTraits {
|
||||
target->minimum_logical_font_size = src->minimum_logical_font_size;
|
||||
|
||||
cef_string_set(src->default_encoding.str, src->default_encoding.length,
|
||||
&target->default_encoding, copy);
|
||||
&target->default_encoding, copy);
|
||||
|
||||
target->remote_fonts = src->remote_fonts;
|
||||
target->javascript = src->javascript;
|
||||
@@ -711,14 +694,15 @@ struct CefBrowserSettingsTraits {
|
||||
target->text_area_resize = src->text_area_resize;
|
||||
target->tab_to_links = src->tab_to_links;
|
||||
target->local_storage = src->local_storage;
|
||||
target->databases= src->databases;
|
||||
target->databases = src->databases;
|
||||
target->application_cache = src->application_cache;
|
||||
target->webgl = src->webgl;
|
||||
|
||||
target->background_color = src->background_color;
|
||||
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length, &target->accept_language_list, copy);
|
||||
src->accept_language_list.length,
|
||||
&target->accept_language_list, copy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -727,7 +711,6 @@ struct CefBrowserSettingsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefBrowserSettingsTraits> CefBrowserSettings;
|
||||
|
||||
|
||||
struct CefURLPartsTraits {
|
||||
typedef cef_urlparts_t struct_type;
|
||||
|
||||
@@ -745,14 +728,15 @@ struct CefURLPartsTraits {
|
||||
cef_string_clear(&s->query);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
cef_string_set(src->spec.str, src->spec.length, &target->spec, copy);
|
||||
cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy);
|
||||
cef_string_set(src->username.str, src->username.length, &target->username,
|
||||
copy);
|
||||
copy);
|
||||
cef_string_set(src->password.str, src->password.length, &target->password,
|
||||
copy);
|
||||
copy);
|
||||
cef_string_set(src->host.str, src->host.length, &target->host, copy);
|
||||
cef_string_set(src->port.str, src->port.length, &target->port, copy);
|
||||
cef_string_set(src->origin.str, src->origin.length, &target->origin, copy);
|
||||
@@ -766,7 +750,6 @@ struct CefURLPartsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefURLPartsTraits> CefURLParts;
|
||||
|
||||
|
||||
struct CefTimeTraits {
|
||||
typedef cef_time_t struct_type;
|
||||
|
||||
@@ -774,8 +757,9 @@ struct CefTimeTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -788,15 +772,13 @@ class CefTime : public CefStructBase<CefTimeTraits> {
|
||||
typedef CefStructBase<CefTimeTraits> parent;
|
||||
|
||||
CefTime() : parent() {}
|
||||
CefTime(const cef_time_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefTime(const CefTime& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefTime(const cef_time_t& r) : parent(r) {}
|
||||
CefTime(const CefTime& r) : parent(r) {}
|
||||
explicit CefTime(time_t r) : parent() { SetTimeT(r); }
|
||||
explicit CefTime(double r) : parent() { SetDoubleT(r); }
|
||||
|
||||
// Converts to/from time_t.
|
||||
void SetTimeT(time_t r) {
|
||||
cef_time_from_timet(r, this);
|
||||
}
|
||||
void SetTimeT(time_t r) { cef_time_from_timet(r, this); }
|
||||
time_t GetTimeT() const {
|
||||
time_t time = 0;
|
||||
cef_time_to_timet(this, &time);
|
||||
@@ -806,9 +788,7 @@ class CefTime : public CefStructBase<CefTimeTraits> {
|
||||
// Converts to/from a double which is the number of seconds since epoch
|
||||
// (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
|
||||
// means "not initialized".
|
||||
void SetDoubleT(double r) {
|
||||
cef_time_from_doublet(r, this);
|
||||
}
|
||||
void SetDoubleT(double r) { cef_time_from_doublet(r, this); }
|
||||
double GetDoubleT() const {
|
||||
double time = 0;
|
||||
cef_time_to_doublet(this, &time);
|
||||
@@ -816,9 +796,7 @@ class CefTime : public CefStructBase<CefTimeTraits> {
|
||||
}
|
||||
|
||||
// Set this object to now.
|
||||
void Now() {
|
||||
cef_time_now(this);
|
||||
}
|
||||
void Now() { cef_time_now(this); }
|
||||
|
||||
// Return the delta between this object and |other| in milliseconds.
|
||||
long long Delta(const CefTime& other) {
|
||||
@@ -828,7 +806,6 @@ class CefTime : public CefStructBase<CefTimeTraits> {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct CefCookieTraits {
|
||||
typedef cef_cookie_t struct_type;
|
||||
|
||||
@@ -841,8 +818,9 @@ struct CefCookieTraits {
|
||||
cef_string_clear(&s->path);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
cef_string_set(src->name.str, src->name.length, &target->name, copy);
|
||||
cef_string_set(src->value.str, src->value.length, &target->value, copy);
|
||||
cef_string_set(src->domain.str, src->domain.length, &target->domain, copy);
|
||||
@@ -861,7 +839,6 @@ struct CefCookieTraits {
|
||||
///
|
||||
typedef CefStructBase<CefCookieTraits> CefCookie;
|
||||
|
||||
|
||||
struct CefGeopositionTraits {
|
||||
typedef cef_geoposition_t struct_type;
|
||||
|
||||
@@ -871,8 +848,9 @@ struct CefGeopositionTraits {
|
||||
cef_string_clear(&s->error_message);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->latitude = src->latitude;
|
||||
target->longitude = src->longitude;
|
||||
target->altitude = src->altitude;
|
||||
@@ -883,7 +861,7 @@ struct CefGeopositionTraits {
|
||||
target->timestamp = src->timestamp;
|
||||
target->error_code = src->error_code;
|
||||
cef_string_set(src->error_message.str, src->error_message.length,
|
||||
&target->error_message, copy);
|
||||
&target->error_message, copy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -892,7 +870,6 @@ struct CefGeopositionTraits {
|
||||
///
|
||||
typedef CefStructBase<CefGeopositionTraits> CefGeoposition;
|
||||
|
||||
|
||||
struct CefCursorInfoTraits {
|
||||
typedef cef_cursor_info_t struct_type;
|
||||
|
||||
@@ -900,8 +877,9 @@ struct CefCursorInfoTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->hotspot = src->hotspot;
|
||||
target->image_scale_factor = src->image_scale_factor;
|
||||
target->buffer = src->buffer;
|
||||
@@ -914,7 +892,6 @@ struct CefCursorInfoTraits {
|
||||
///
|
||||
typedef CefStructBase<CefCursorInfoTraits> CefCursorInfo;
|
||||
|
||||
|
||||
struct CefPdfPrintSettingsTraits {
|
||||
typedef cef_pdf_print_settings_t struct_type;
|
||||
|
||||
@@ -925,13 +902,14 @@ struct CefPdfPrintSettingsTraits {
|
||||
cef_string_clear(&s->header_footer_url);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
cef_string_set(src->header_footer_title.str,
|
||||
src->header_footer_title.length, &target->header_footer_title, copy);
|
||||
src->header_footer_title.length,
|
||||
&target->header_footer_title, copy);
|
||||
cef_string_set(src->header_footer_url.str, src->header_footer_url.length,
|
||||
&target->header_footer_url, copy);
|
||||
&target->header_footer_url, copy);
|
||||
|
||||
target->page_width = src->page_width;
|
||||
target->page_height = src->page_height;
|
||||
@@ -956,7 +934,6 @@ struct CefPdfPrintSettingsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefPdfPrintSettingsTraits> CefPdfPrintSettings;
|
||||
|
||||
|
||||
struct CefBoxLayoutSettingsTraits {
|
||||
typedef cef_box_layout_settings_t struct_type;
|
||||
|
||||
@@ -964,8 +941,9 @@ struct CefBoxLayoutSettingsTraits {
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
@@ -986,10 +964,10 @@ struct CefCompositionUnderlineTraits {
|
||||
s->thick = 0;
|
||||
}
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
}
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->range = src->range;
|
||||
target->color = src->color;
|
||||
|
@@ -27,7 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_WIN_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_WIN_H_
|
||||
#pragma once
|
||||
@@ -48,8 +47,9 @@ struct CefMainArgsTraits {
|
||||
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) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->instance = src->instance;
|
||||
}
|
||||
};
|
||||
@@ -62,9 +62,7 @@ class CefMainArgs : public CefStructBase<CefMainArgsTraits> {
|
||||
CefMainArgs() : parent() {}
|
||||
explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {}
|
||||
explicit CefMainArgs(const CefMainArgs& r) : parent(r) {}
|
||||
explicit CefMainArgs(HINSTANCE hInstance) : parent() {
|
||||
instance = hInstance;
|
||||
}
|
||||
explicit CefMainArgs(HINSTANCE hInstance) : parent() { instance = hInstance; }
|
||||
};
|
||||
|
||||
struct CefWindowInfoTraits {
|
||||
@@ -76,11 +74,12 @@ struct CefWindowInfoTraits {
|
||||
cef_string_clear(&s->window_name);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
static inline void set(const struct_type* src,
|
||||
struct_type* target,
|
||||
bool copy) {
|
||||
target->ex_style = src->ex_style;
|
||||
cef_string_set(src->window_name.str, src->window_name.length,
|
||||
&target->window_name, copy);
|
||||
&target->window_name, copy);
|
||||
target->style = src->style;
|
||||
target->x = src->x;
|
||||
target->y = src->y;
|
||||
@@ -108,8 +107,8 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
// Create the browser as a child window.
|
||||
///
|
||||
void SetAsChild(CefWindowHandle parent, RECT windowRect) {
|
||||
style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP |
|
||||
WS_VISIBLE;
|
||||
style =
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | WS_VISIBLE;
|
||||
parent_window = parent;
|
||||
x = windowRect.left;
|
||||
y = windowRect.top;
|
||||
@@ -121,8 +120,8 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
// Create the browser as a popup window.
|
||||
///
|
||||
void SetAsPopup(CefWindowHandle parent, const CefString& windowName) {
|
||||
style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
|
||||
WS_VISIBLE;
|
||||
style =
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE;
|
||||
parent_window = parent;
|
||||
x = CW_USEDEFAULT;
|
||||
y = CW_USEDEFAULT;
|
||||
|
Reference in New Issue
Block a user