Berkelium

Berkelium Namespace Reference

Namespaces

namespace  Script

Classes

class  ErrorDelegate
 May be implemented to handle global errors gracefully. More...
class  Context
 A context holds onto a reference counted profile object. More...
class  Cursor
 A sort-of cross platform cursor class. More...
struct  Rect
struct  WeakString
class  Widget
 A widget is a rectangular canvas which can be painted to. More...
class  Window
 Windows are individual web pages, the equivalent of a single tab in a normal browser. More...
struct  ContextMenuEventArgs
 Holds parameters for the onContextMenu delegate method. More...
class  WindowDelegate
 Override WindowDelegate methods to intercept events from a render view. More...

Typedefs

typedef unsigned short char16
typedef WeakString< char > UTF8String
typedef WeakString< char16UTF16String
typedef WeakString< char > URLString
typedef WeakString< wchar_t > WideString
typedef WeakString< char > FileString

Enumerations

enum  KeyModifier {
  SHIFT_MOD = 1 << 0, CONTROL_MOD = 1 << 1, ALT_MOD = 1 << 2, META_MOD = 1 << 3,
  KEYPAD_KEY = 1 << 4, AUTOREPEAT_KEY = 1 << 5, SYSTEM_KEY = 1 << 6
}
enum  ScriptAlertType { JavascriptAlert = 0, JavascriptConfirm = 1, JavascriptPrompt = 2 }
enum  FileChooserType { FileOpen = 0, FileOpenMultiple = 1, FileOpenFolder = 2, FileSaveAs = 3 }

Functions

void BERKELIUM_EXPORT forkedProcessHook (int argc, char **argv)
 Called by child processes.
bool BERKELIUM_EXPORT init (FileString homeDirectory, FileString subprocessDirectory, unsigned int extra_argc=0, const char *extra_argv[]=NULL)
 Initialize berkelium's global object.
bool BERKELIUM_EXPORT init (FileString homeDirectory, unsigned int extra_argc=0, const char *extra_argv[]=NULL)
 Iniitialize berkelium's global object.
void BERKELIUM_EXPORT destroy ()
 Destroys Berkelium and attempts to free as much memory as possible.
void BERKELIUM_EXPORT setErrorHandler (ErrorDelegate *errorHandler)
void BERKELIUM_EXPORT update ()
 Runs the message loop until all pending messages are processed.
void BERKELIUM_EXPORT runUntilStopped ()
void BERKELIUM_EXPORT stopRunning ()
void BERKELIUM_EXPORT setCookie (URLString url, WideString cookieString)
 Sets a cookie for a given URL.
WideString BERKELIUM_EXPORT UTF8ToWide (const UTF8String &in)
UTF8String BERKELIUM_EXPORT WideToUTF8 (const WideString &in)
WideString BERKELIUM_EXPORT UTF16ToWide (const UTF16String &in)
UTF16String BERKELIUM_EXPORT WideToUTF16 (const WideString &in)
UTF8String BERKELIUM_EXPORT UTF16ToUTF8 (const UTF16String &in)
UTF16String BERKELIUM_EXPORT UTF8ToUTF16 (const UTF8String &in)
void BERKELIUM_EXPORT stringUtil_free (WideString returnedValue)
template<class StrType , class CharType >
StrType & operator+ (const StrType &lhs, const WeakString< CharType > &rhs)
template<class StrType , class CharType >
StrType & operator+= (StrType &lhs, const WeakString< CharType > &rhs)
template<class OstreamType , class CharType >
OstreamType & operator<< (OstreamType &lhs, const WeakString< CharType > &rhs)

Typedef Documentation

typedef unsigned short Berkelium::char16

Enumeration Type Documentation

Enumerator:
FileOpen 
FileOpenMultiple 
FileOpenFolder 
FileSaveAs 
Enumerator:
SHIFT_MOD 
CONTROL_MOD 
ALT_MOD 
META_MOD 
KEYPAD_KEY 
AUTOREPEAT_KEY 
SYSTEM_KEY 
Enumerator:
JavascriptAlert 
JavascriptConfirm 
JavascriptPrompt 

Function Documentation

void BERKELIUM_EXPORT Berkelium::destroy (  ) 

Destroys Berkelium and attempts to free as much memory as possible.

Note: You must destroy all Window and Context objects before calling Berkelium::destroy()!

void BERKELIUM_EXPORT Berkelium::forkedProcessHook ( int  argc,
char **  argv 
)

Called by child processes.

Should only ever be called from subprocess.cpp (berkelium.exe).

bool BERKELIUM_EXPORT Berkelium::init ( FileString  homeDirectory,
unsigned int  extra_argc = 0,
const char *  extra_argv[] = NULL 
)

Iniitialize berkelium's global object.

Parameters:
homeDirectory Just like Chrome's --user-data-dir command line flag. If homeDirectory is null or empty, creates a temporary data directory.
bool BERKELIUM_EXPORT Berkelium::init ( FileString  homeDirectory,
FileString  subprocessDirectory,
unsigned int  extra_argc = 0,
const char *  extra_argv[] = NULL 
)

Initialize berkelium's global object.

Parameters:
homeDirectory Just like Chrome's --user-data-dir command line flag. If homeDirectory is null or empty, creates a temporary data directory.
subprocessDirectory Path to berkelium.exe.
template<class StrType , class CharType >
StrType& Berkelium::operator+ ( const StrType &  lhs,
const WeakString< CharType > &  rhs 
) [inline]
template<class StrType , class CharType >
StrType& Berkelium::operator+= ( StrType &  lhs,
const WeakString< CharType > &  rhs 
) [inline]
template<class OstreamType , class CharType >
OstreamType& Berkelium::operator<< ( OstreamType &  lhs,
const WeakString< CharType > &  rhs 
) [inline]
void BERKELIUM_EXPORT Berkelium::runUntilStopped (  ) 
void BERKELIUM_EXPORT Berkelium::setCookie ( URLString  url,
WideString  cookieString 
)

Sets a cookie for a given URL.

Parameters:
url The URL to set the cookie on.
cookieString The cookie string.
void BERKELIUM_EXPORT Berkelium::setErrorHandler ( ErrorDelegate *  errorHandler  ) 
void BERKELIUM_EXPORT Berkelium::stopRunning (  ) 
void BERKELIUM_EXPORT Berkelium::stringUtil_free ( WideString  returnedValue  ) 
void BERKELIUM_EXPORT Berkelium::update (  ) 

Runs the message loop until all pending messages are processed.

Must be called from the same thread as all other Berkelium functions, usually your program's main (UI) thread. For now, you have to poll to receive updates without blocking indefinitely.

Your WindowDelegate's should only receive callbacks synchronously with this call to update.

UTF8String BERKELIUM_EXPORT Berkelium::UTF16ToUTF8 ( const UTF16String &  in  ) 
WideString BERKELIUM_EXPORT Berkelium::UTF16ToWide ( const UTF16String &  in  ) 
UTF16String BERKELIUM_EXPORT Berkelium::UTF8ToUTF16 ( const UTF8String &  in  ) 
WideString BERKELIUM_EXPORT Berkelium::UTF8ToWide ( const UTF8String &  in  ) 
UTF16String BERKELIUM_EXPORT Berkelium::WideToUTF16 ( const WideString &  in  ) 
UTF8String BERKELIUM_EXPORT Berkelium::WideToUTF8 ( const WideString &  in  ) 

Documentation generated on 22 Nov 2013