|
CEF C++ API Docs - Revision 1123 | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
CEF_EXPORT int |
cef_build_revision()
Returns the CEF build revision of the libcef library. |
CEF_EXPORT int |
cef_string_ascii_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output )
|
CEF_EXPORT int |
cef_string_ascii_to_wide( const char* src, size_t src_len, cef_string_wide_t* output )
These functions convert an ASCII string, typically a hardcoded constant, to a Wide/UTF16 string. |
CEF_EXPORT cef_string_list_t |
cef_string_list_alloc()
Allocate a new string map. |
CEF_EXPORT void |
cef_string_list_append( cef_string_list_t list, const cef_string_t* value )
Append a new value at the end of the string list. |
CEF_EXPORT void |
cef_string_list_clear( cef_string_list_t list )
Clear the string list. |
CEF_EXPORT cef_string_list_t |
cef_string_list_copy( cef_string_list_t list )
Creates a copy of an existing string list. |
CEF_EXPORT void |
cef_string_list_free( cef_string_list_t list )
Free the string list. |
CEF_EXPORT int |
cef_string_list_size( cef_string_list_t list )
Return the number of elements in the string list. |
CEF_EXPORT int |
cef_string_list_value( cef_string_list_t list, int index, cef_string_t* value )
Retrieve the value at the specified zero-based string list index. |
CEF_EXPORT cef_string_map_t |
cef_string_map_alloc()
Allocate a new string map. |
CEF_EXPORT int |
cef_string_map_append( cef_string_map_t map, const cef_string_t* key, const cef_string_t* value )
Append a new key/value pair at the end of the string map. |
CEF_EXPORT void |
cef_string_map_clear( cef_string_map_t map )
Clear the string map. |
CEF_EXPORT int |
cef_string_map_find( cef_string_map_t map, const cef_string_t* key, cef_string_t* value )
Return the value assigned to the specified key. |
CEF_EXPORT void |
cef_string_map_free( cef_string_map_t map )
Free the string map. |
CEF_EXPORT int |
cef_string_map_key( cef_string_map_t map, int index, cef_string_t* key )
Return the key at the specified zero-based string map index. |
CEF_EXPORT int |
cef_string_map_size( cef_string_map_t map )
Return the number of elements in the string map. |
CEF_EXPORT int |
cef_string_map_value( cef_string_map_t map, int index, cef_string_t* value )
Return the value at the specified zero-based string map index. |
CEF_EXPORT cef_string_multimap_t |
cef_string_multimap_alloc()
Allocate a new string multimap. |
CEF_EXPORT int |
cef_string_multimap_append( cef_string_multimap_t map, const cef_string_t* key, const cef_string_t* value )
Append a new key/value pair at the end of the string multimap. |
CEF_EXPORT void |
cef_string_multimap_clear( cef_string_multimap_t map )
Clear the string multimap. |
CEF_EXPORT int |
cef_string_multimap_enumerate( cef_string_multimap_t map, const cef_string_t* key, int value_index, cef_string_t* value )
Return the value_index-th value with the specified key. |
CEF_EXPORT int |
cef_string_multimap_find_count( cef_string_multimap_t map, const cef_string_t* key )
Return the number of values with the specified key. |
CEF_EXPORT void |
cef_string_multimap_free( cef_string_multimap_t map )
Free the string multimap. |
CEF_EXPORT int |
cef_string_multimap_key( cef_string_multimap_t map, int index, cef_string_t* key )
Return the key at the specified zero-based string multimap index. |
CEF_EXPORT int |
cef_string_multimap_size( cef_string_multimap_t map )
Return the number of elements in the string multimap. |
CEF_EXPORT int |
cef_string_multimap_value( cef_string_multimap_t map, int index, cef_string_t* value )
Return the value at the specified zero-based string multimap index. |
CEF_EXPORT cef_string_userfree_utf16_t |
cef_string_userfree_utf16_alloc()
|
CEF_EXPORT void |
cef_string_userfree_utf16_free( cef_string_userfree_utf16_t str )
|
CEF_EXPORT cef_string_userfree_utf8_t |
cef_string_userfree_utf8_alloc()
|
CEF_EXPORT void |
cef_string_userfree_utf8_free( cef_string_userfree_utf8_t str )
|
CEF_EXPORT cef_string_userfree_wide_t |
cef_string_userfree_wide_alloc()
These functions allocate a new string structure. |
CEF_EXPORT void |
cef_string_userfree_wide_free( cef_string_userfree_wide_t str )
These functions free the string structure allocated by the associated alloc function. |
CEF_EXPORT void |
cef_string_utf16_clear( cef_string_utf16_t* str )
|
CEF_EXPORT int |
cef_string_utf16_cmp( const cef_string_utf16_t* str1, const cef_string_utf16_t* str2 )
|
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_utf16_to_utf8( const char16* src, size_t src_len, cef_string_utf8_t* output )
|
CEF_EXPORT int |
cef_string_utf16_to_wide( const char16* src, size_t src_len, cef_string_wide_t* output )
|
CEF_EXPORT void |
cef_string_utf8_clear( cef_string_utf8_t* str )
|
CEF_EXPORT int |
cef_string_utf8_cmp( const cef_string_utf8_t* str1, const cef_string_utf8_t* str2 )
|
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_utf8_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output )
|
CEF_EXPORT int |
cef_string_utf8_to_wide( const char* src, size_t src_len, cef_string_wide_t* output )
|
CEF_EXPORT void |
cef_string_wide_clear( cef_string_wide_t* str )
These functions clear string values. |
CEF_EXPORT int |
cef_string_wide_cmp( const cef_string_wide_t* str1, const cef_string_wide_t* str2 )
These functions compare two string values with the same results as strcmp(). |
CEF_EXPORT int |
cef_string_wide_set( const wchar_t* src, size_t src_len, cef_string_wide_t* output, int copy )
These functions set string values. |
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_wide_to_utf8( const wchar_t* src, size_t src_len, cef_string_utf8_t* output )
These functions convert between UTF-8, -16, and -32 strings. |
CEF_EXPORT int |
cef_time_delta( const cef_time_t* cef_time1, const cef_time_t* cef_time2, long long* delta )
Retrieve the delta in milliseconds between two time values. |
CEF_EXPORT int |
cef_time_from_doublet( double time, cef_time_t* cef_time )
|
CEF_EXPORT int |
cef_time_from_timet( time_t time, cef_time_t* cef_time )
|
CEF_EXPORT int |
cef_time_now( cef_time_t* cef_time )
Retrieve the current system time. |
CEF_EXPORT int |
cef_time_to_doublet( const cef_time_t* cef_time, double* time )
Converts cef_time_t to/from a double which is the number of seconds since epoch (Jan 1, 1970). |
CEF_EXPORT int |
cef_time_to_timet( const cef_time_t* cef_time, time_t* time )
Converts cef_time_t to/from time_t. |
bool |
CefAddCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains )
Add an entry to the cross-origin access whitelist. |
bool |
CefClearCrossOriginWhitelist()
Remove all entries from the cross-origin access whitelist. |
bool |
CefClearSchemeHandlerFactories()
Clear all registered scheme handler factories. |
bool |
CefCreateURL( const CefURLParts& parts, CefString& url )
Creates a URL from the specified |parts|, which must contain a non-empty spec or a non-empty host and path (at a minimum), but not both. |
bool |
CefCurrentlyOn( CefThreadId threadId )
CEF maintains multiple internal threads that are used for handling different types of tasks. |
void |
CefDoMessageLoopWork()
Perform a single iteration of CEF message loop processing. |
bool |
CefGetGeolocation( CefRefPtr< CefGetGeolocationCallback > callback )
Request a one-time geolocation update. |
size_t |
CefGetWebPluginCount()
Returns the number of installed web plugins. |
CefRefPtr< CefWebPluginInfo > |
CefGetWebPluginInfo( int index )
Returns information for web plugin at the specified zero-based index. |
CefRefPtr< CefWebPluginInfo > |
CefGetWebPluginInfo( const CefString& name )
Returns information for web plugin with the specified name. |
bool |
CefInitialize( const CefSettings& settings, CefRefPtr< CefApp > application )
This function should be called on the main application thread to initialize CEF when the application is started. |
bool |
CefParseURL( const CefString& url, CefURLParts& parts )
Parse the specified |url| into its component parts. |
bool |
CefPostDelayedTask( CefThreadId threadId, CefRefPtr< CefTask > task, int64 delay_ms )
Post a task for delayed execution on the specified thread. |
bool |
CefPostTask( CefThreadId threadId, CefRefPtr< CefTask > task )
Post a task for execution on the specified thread. |
void |
CefQuitMessageLoop()
Quit the CEF message loop that was started by calling CefRunMessageLoop(). |
bool |
CefRegisterExtension( const CefString& extension_name, const CefString& javascript_code, CefRefPtr< CefV8Handler > handler )
Register a new V8 extension with the specified JavaScript extension code and handler. |
bool |
CefRegisterPlugin( const CefPluginInfo& plugin_info )
Register a plugin with the system. |
bool |
CefRegisterSchemeHandlerFactory( const CefString& scheme_name, const CefString& domain_name, CefRefPtr< CefSchemeHandlerFactory > factory )
Register a scheme handler factory for the specified |scheme_name| and optional |domain_name|. |
bool |
CefRemoveCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains )
Remove an entry from the cross-origin access whitelist. |
void |
CefRunMessageLoop()
Run the CEF message loop. |
void |
CefSetOSModalLoop( bool osModalLoop )
Set to true before calling Windows APIs like TrackPopupMenu that enter a modal message loop. |
void |
CefShutdown()
This function should be called on the main application thread to shut down CEF before the application exits. |
inline bool |
operator!=( const CefRect& a, const CefRect& b )
|
inline bool |
operator==( const CefRect& a, const CefRect& b )
|
Method Detail |
CEF_EXPORT int cef_build_revision();
CEF_EXPORT int cef_string_ascii_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output );
CEF_EXPORT int cef_string_ascii_to_wide( const char* src, size_t src_len, cef_string_wide_t* output );
CEF_EXPORT cef_string_list_t cef_string_list_alloc();
CEF_EXPORT void cef_string_list_append( cef_string_list_t list, const cef_string_t* value );
CEF_EXPORT void cef_string_list_clear( cef_string_list_t list );
CEF_EXPORT cef_string_list_t cef_string_list_copy( cef_string_list_t list );
CEF_EXPORT void cef_string_list_free( cef_string_list_t list );
CEF_EXPORT int cef_string_list_size( cef_string_list_t list );
CEF_EXPORT int cef_string_list_value( cef_string_list_t list, int index, cef_string_t* value );
CEF_EXPORT cef_string_map_t cef_string_map_alloc();
CEF_EXPORT int cef_string_map_append( cef_string_map_t map, const cef_string_t* key, const cef_string_t* value );
CEF_EXPORT void cef_string_map_clear( cef_string_map_t map );
CEF_EXPORT int cef_string_map_find( cef_string_map_t map, const cef_string_t* key, cef_string_t* value );
CEF_EXPORT void cef_string_map_free( cef_string_map_t map );
CEF_EXPORT int cef_string_map_key( cef_string_map_t map, int index, cef_string_t* key );
CEF_EXPORT int cef_string_map_size( cef_string_map_t map );
CEF_EXPORT int cef_string_map_value( cef_string_map_t map, int index, cef_string_t* value );
CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();
CEF_EXPORT int cef_string_multimap_append( cef_string_multimap_t map, const cef_string_t* key, const cef_string_t* value );
CEF_EXPORT void cef_string_multimap_clear( cef_string_multimap_t map );
CEF_EXPORT int cef_string_multimap_enumerate( cef_string_multimap_t map, const cef_string_t* key, int value_index, cef_string_t* value );
CEF_EXPORT int cef_string_multimap_find_count( cef_string_multimap_t map, const cef_string_t* key );
CEF_EXPORT void cef_string_multimap_free( cef_string_multimap_t map );
CEF_EXPORT int cef_string_multimap_key( cef_string_multimap_t map, int index, cef_string_t* key );
CEF_EXPORT int cef_string_multimap_size( cef_string_multimap_t map );
CEF_EXPORT int cef_string_multimap_value( cef_string_multimap_t map, int index, cef_string_t* value );
CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc();
CEF_EXPORT void cef_string_userfree_utf16_free( cef_string_userfree_utf16_t str );
CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc();
CEF_EXPORT void cef_string_userfree_utf8_free( cef_string_userfree_utf8_t str );
CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc();
CEF_EXPORT void cef_string_userfree_wide_free( cef_string_userfree_wide_t str );
CEF_EXPORT void cef_string_utf16_clear( cef_string_utf16_t* str );
CEF_EXPORT int cef_string_utf16_cmp( const cef_string_utf16_t* str1, const cef_string_utf16_t* str2 );
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_utf16_to_utf8( const char16* src, size_t src_len, cef_string_utf8_t* output );
CEF_EXPORT int cef_string_utf16_to_wide( const char16* src, size_t src_len, cef_string_wide_t* output );
CEF_EXPORT void cef_string_utf8_clear( cef_string_utf8_t* str );
CEF_EXPORT int cef_string_utf8_cmp( const cef_string_utf8_t* str1, const cef_string_utf8_t* str2 );
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_utf8_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output );
CEF_EXPORT int cef_string_utf8_to_wide( const char* src, size_t src_len, cef_string_wide_t* output );
CEF_EXPORT void cef_string_wide_clear( cef_string_wide_t* str );
CEF_EXPORT int cef_string_wide_cmp( const cef_string_wide_t* str1, const cef_string_wide_t* str2 );
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_wide_to_utf16( const wchar_t* src, size_t src_len, cef_string_utf16_t* output );
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_time_delta( const cef_time_t* cef_time1, const cef_time_t* cef_time2, long long* delta );
CEF_EXPORT int cef_time_from_doublet( double time, cef_time_t* cef_time );
CEF_EXPORT int cef_time_from_timet( time_t time, cef_time_t* cef_time );
CEF_EXPORT int cef_time_now( cef_time_t* cef_time );
CEF_EXPORT int cef_time_to_doublet( const cef_time_t* cef_time, double* time );
CEF_EXPORT int cef_time_to_timet( const cef_time_t* cef_time, time_t* time );
bool CefAddCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains );
bool CefClearCrossOriginWhitelist();
bool CefClearSchemeHandlerFactories();
bool CefCreateURL( const CefURLParts& parts, CefString& url );
bool CefCurrentlyOn( CefThreadId threadId );
void CefDoMessageLoopWork();
bool CefGetGeolocation( CefRefPtr< CefGetGeolocationCallback > callback );
size_t CefGetWebPluginCount();
CefRefPtr< CefWebPluginInfo > CefGetWebPluginInfo( int index );
CefRefPtr< CefWebPluginInfo > CefGetWebPluginInfo( const CefString& name );
bool CefInitialize( const CefSettings& settings, CefRefPtr< CefApp > application );
bool CefParseURL( const CefString& url, CefURLParts& parts );
bool CefPostDelayedTask( CefThreadId threadId, CefRefPtr< CefTask > task, int64 delay_ms );
bool CefPostTask( CefThreadId threadId, CefRefPtr< CefTask > task );
void CefQuitMessageLoop();
bool CefRegisterExtension( const CefString& extension_name, const CefString& javascript_code, CefRefPtr< CefV8Handler > handler );
// create the 'example' global object if it doesn't already exist. if (!example) example = {}; // create the 'example.test' global object if it doesn't already exist. if (!example.test) example.test = {}; (function() { // Define the function 'example.test.myfunction'. example.test.myfunction = function() { // Call CefV8Handler::Execute() with the function name 'MyFunction' // and no arguments. native function MyFunction(); return MyFunction(); }; // Define the getter function for parameter 'example.test.myparam'. example.test.__defineGetter__('myparam', function() { // Call CefV8Handler::Execute() with the function name 'GetMyParam' // and no arguments. native function GetMyParam(); return GetMyParam(); }); // Define the setter function for parameter 'example.test.myparam'. example.test.__defineSetter__('myparam', function(b) { // Call CefV8Handler::Execute() with the function name 'SetMyParam' // and a single argument. native function SetMyParam(); if(b) SetMyParam(b); }); // Extension definitions can also contain normal JavaScript variables // and functions. var myint = 0; example.test.increment = function() { myint += 1; return myint; }; })();Example usage in the page:
// Call the function. example.test.myfunction(); // Set the parameter. example.test.myparam = value; // Get the parameter. value = example.test.myparam; // Call another function. example.test.increment();
bool CefRegisterPlugin( const CefPluginInfo& plugin_info );
bool CefRegisterSchemeHandlerFactory( const CefString& scheme_name, const CefString& domain_name, CefRefPtr< CefSchemeHandlerFactory > factory );
bool CefRemoveCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains );
void CefRunMessageLoop();
void CefSetOSModalLoop( bool osModalLoop );
void CefShutdown();
inline bool operator!=( const CefRect& a, const CefRect& b );
inline bool operator==( const CefRect& a, const CefRect& b );
|
CEF C++ API Docs - Revision 1123 | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |