|
Awesomium
1.6.3
|
Hi there, welcome to the Awesomium C API docs! Awesomium is a software library that makes it easy to put the web in your applications. Whether that means embedded web browsing, rendering pages as images, streaming pages over the net, or manipulating web content live for some other purpose, Awesomium does it all.
Our C API provides much more compatibility than our C++ API at the cost of some extra convenience.
To start off, we'd recommend looking at some of the following functions:
awe_webcore_initialize()
awe_webcore_initialize_default()
awe_webcore_shutdown()
awe_webcore_create_webview()
awe_webview_load_url()
awe_webview_render()
awe_webview_destroy()
To avoid memory leaks, there is one major rule that you must follow in our C API regarding ownership of returned objects: if a function returns a regular pointer to an instance, you must destroy the instance using the relevant method. Otherwise, if a function returns a const pointer to an instance, you should not destroy it (ownership is retained by Awesomium).
For example, you must destroy all strings you create in Awesomium:
awe_string* str = awe_string_create_from_ascii("Hello", strlen("Hello"));// Use the string somewhere... then destroy it when we are done:
awe_string_destroy(str);
But you should not destroy certain strings returned from certain methods:
const awe_string* str = awe_webcore_get_base_directory(); // We do not need to destroy this string: when a function returns
// a const pointer in Awesomium, it means ownership is retained by
// Awesomium and the instance will be destroyed automatically later.
For more help and tips with the API, please visit our Knowledge Base <http://support.awesomium.com/faqs>
This documentation is copyright (C) 2011 Khrona. All rights reserved. Awesomium is a trademark of Khrona.