Skip to content

Commit

Permalink
Mac v56 release almost ready (#295)...
Browse files Browse the repository at this point in the history
Fixes to examples and build tools on Mac.

Update to CEF 3.2924.1575.g97389a9 on Mac.

Support automate.py --prebuilt-cef on Mac.

Fix qt4.py example on Mac.
Rename qt.py to qt4.py.

Fix gtk2.py example on Mac.
On Mac the gtk2.py example forces CEF message loop by default.

You can enable debug information in all examples by passing
--debug flag. Added info to KB.

Add instructions on how to debug "segmentation fault" crash
on Linux and Mac in the Knowledge Base document.

Update all examples to add detailed notes about clearing all
browser references for CEF to shutdown cleanly.

Rename build_module.py tool to cython_setup.py.

Enhance sudo detection in build.py.

Increase time for message loop to 1 sec, otherwise tests
sometimes fail with error:
> AssertionError: Check assert:
> LoadHandler.FrameSourceVisitor_True

Create API.md document which links to root api/ directory.

Enhance linking in api/ reference, in top headers
and in API index.
  • Loading branch information
cztomczak committed Mar 3, 2017
1 parent 039a461 commit 23a6c62
Show file tree
Hide file tree
Showing 18 changed files with 514 additions and 327 deletions.
76 changes: 38 additions & 38 deletions api/API-index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[API categories](API-categories.md) | [API index](API-index.md)
[API categories](API-categories.md#api-categories) | [API index](API-index.md#api-index)

# API index

* [Application settings](ApplicationSettings.md)
* [Application settings](ApplicationSettings.md#application-settings)
* [accept_language_list](ApplicationSettings.md#accept_language_list)
* [auto_zooming](ApplicationSettings.md#auto_zooming)
* [background_color](ApplicationSettings.md#background_color)
Expand Down Expand Up @@ -35,7 +35,7 @@
* [user_agent](ApplicationSettings.md#user_agent)
* [user_data_path](ApplicationSettings.md#user_data_path)
* [windowless_rendering_enabled](ApplicationSettings.md#windowless_rendering_enabled)
* [Browser (object)](Browser.md)
* [Browser (object)](Browser.md#browser-object)
* [AddWordToDictionary](Browser.md#addwordtodictionary)
* [CanGoBack](Browser.md#cangoback)
* [CanGoForward](Browser.md#cangoforward)
Expand Down Expand Up @@ -109,7 +109,7 @@
* [TryCloseBrowser](Browser.md#tryclosebrowser)
* [WasResized](Browser.md#wasresized)
* [WasHidden](Browser.md#washidden)
* [Browser settings](BrowserSettings.md)
* [Browser settings](BrowserSettings.md#browser-settings)
* [Font settings](BrowserSettings.md#font-settings)
* [accept_language_list](BrowserSettings.md#accept_language_list)
* [application_cache_disabled](BrowserSettings.md#application_cache_disabled)
Expand All @@ -134,10 +134,10 @@
* [web_security_disabled](BrowserSettings.md#web_security_disabled)
* [webgl_disabled](BrowserSettings.md#webgl_disabled)
* [windowless_frame_rate](BrowserSettings.md#windowless_frame_rate)
* [Callback (object)](Callback.md)
* [Callback (object)](Callback.md#callback-object)
* [Continue](Callback.md#continue)
* [Cancel](Callback.md#cancel)
* [cefpython](cefpython.md)
* [cefpython](cefpython.md#cefpython)
* [CreateBrowser](cefpython.md#createbrowser)
* [CreateBrowserSync](cefpython.md#createbrowsersync)
* [ExceptHook](cefpython.md#excepthook)
Expand All @@ -156,12 +156,12 @@
* [SetGlobalClientCallback](cefpython.md#setglobalclientcallback)
* [SetOsModalLoop](cefpython.md#setosmodalloop)
* [Shutdown](cefpython.md#shutdown)
* [Command line switches](CommandLineSwitches.md)
* [Command line switches](CommandLineSwitches.md#command-line-switches)
* [enable-media-stream](CommandLineSwitches.md#enable-media-stream)
* [proxy-server](CommandLineSwitches.md#proxy-server)
* [no-proxy-server](CommandLineSwitches.md#no-proxy-server)
* [disable-gpu](CommandLineSwitches.md#disable-gpu)
* [Cookie (class)](Cookie.md)
* [Cookie (class)](Cookie.md#cookie-class)
* [Set](Cookie.md#set)
* [Get](Cookie.md#get)
* [SetName](Cookie.md#setname)
Expand All @@ -184,7 +184,7 @@
* [GetHasExpires](Cookie.md#gethasexpires)
* [SetExpires](Cookie.md#setexpires)
* [GetExpires](Cookie.md#getexpires)
* [CookieManager (class)](CookieManager.md)
* [CookieManager (class)](CookieManager.md#cookiemanager-class)
* [GetGlobalManager](CookieManager.md#getglobalmanager)
* [CreateManager](CookieManager.md#createmanager)
* [SetSupportedSchemes](CookieManager.md#setsupportedschemes)
Expand All @@ -194,21 +194,21 @@
* [DeleteCookies](CookieManager.md#deletecookies)
* [SetStoragePath](CookieManager.md#setstoragepath)
* [FlushStore](CookieManager.md#flushstore)
* [CookieVisitor (interface)](CookieVisitor.md)
* [CookieVisitor (interface)](CookieVisitor.md#cookievisitor-interface)
* [Visit](CookieVisitor.md#visit)
* [DisplayHandler (interface)](DisplayHandler.md)
* [DisplayHandler (interface)](DisplayHandler.md#displayhandler-interface)
* [OnAddressChange](DisplayHandler.md#onaddresschange)
* [OnTitleChange](DisplayHandler.md#ontitlechange)
* [OnTooltip](DisplayHandler.md#ontooltip)
* [OnStatusMessage](DisplayHandler.md#onstatusmessage)
* [OnConsoleMessage](DisplayHandler.md#onconsolemessage)
* [DownloadHandler](DownloadHandler.md)
* [DpiAware (class)](DpiAware.md)
* [DownloadHandler](DownloadHandler.md#downloadhandler)
* [DpiAware (class)](DpiAware.md#dpiaware-class)
* [CalculateWindowSize](DpiAware.md#calculatewindowsize)
* [GetSystemDpi](DpiAware.md#getsystemdpi)
* [IsProcessDpiAware](DpiAware.md#isprocessdpiaware)
* [SetProcessDpiAware](DpiAware.md#setprocessdpiaware)
* [DragData (object)](DragData.md)
* [DragData (object)](DragData.md#dragdata-object)
* [IsLink](DragData.md#islink)
* [IsFragment](DragData.md#isfragment)
* [GetLinkUrl](DragData.md#getlinkurl)
Expand All @@ -217,11 +217,11 @@
* [GetFragmentHtml](DragData.md#getfragmenthtml)
* [GetImage](DragData.md#getimage)
* [HasImage](DragData.md#hasimage)
* [FocusHandler (interface)](FocusHandler.md)
* [FocusHandler (interface)](FocusHandler.md#focushandler-interface)
* [OnTakeFocus](FocusHandler.md#ontakefocus)
* [OnSetFocus](FocusHandler.md#onsetfocus)
* [OnGotFocus](FocusHandler.md#ongotfocus)
* [Frame (object)](Frame.md)
* [Frame (object)](Frame.md#frame-object)
* [Copy](Frame.md#copy)
* [Cut](Frame.md#cut)
* [Delete](Frame.md#delete)
Expand All @@ -248,42 +248,42 @@
* [SetProperty](Frame.md#setproperty)
* [Undo](Frame.md#undo)
* [ViewSource](Frame.md#viewsource)
* [Image (object)](Image.md)
* [Image (object)](Image.md#image-object)
* [GetAsBitmap](Image.md#getasbitmap)
* [GetAsPng](Image.md#getaspng)
* [GetHeight](Image.md#getheight)
* [GetWidth](Image.md#getwidth)
* [JavascriptBindings (class)](JavascriptBindings.md)
* [JavascriptBindings (class)](JavascriptBindings.md#javascriptbindings-class)
* [\_\_init\_\_](JavascriptBindings.md#__init__)
* [IsValueAllowed](JavascriptBindings.md#isvalueallowed)
* [Rebind](JavascriptBindings.md#rebind)
* [SetFunction](JavascriptBindings.md#setfunction)
* [SetObject](JavascriptBindings.md#setobject)
* [SetProperty](JavascriptBindings.md#setproperty)
* [JavascriptCallback (object)](JavascriptCallback.md)
* [JavascriptCallback (object)](JavascriptCallback.md#javascriptcallback-object)
* [Call](JavascriptCallback.md#call)
* [GetName](JavascriptCallback.md#getname)
* [JavascriptDialogHandler (interface)](JavascriptDialogHandler.md)
* [JavascriptDialogHandler (interface)](JavascriptDialogHandler.md#javascriptdialoghandler-interface)
* [Continue](JavascriptDialogHandler.md#continue)
* [OnJavascriptDialog](JavascriptDialogHandler.md#onjavascriptdialog)
* [OnBeforeUnloadJavascriptDialog](JavascriptDialogHandler.md#onbeforeunloadjavascriptdialog)
* [OnResetJavascriptDialogState](JavascriptDialogHandler.md#onresetjavascriptdialogstate)
* [OnJavascriptDialogClosed](JavascriptDialogHandler.md#onjavascriptdialogclosed)
* [KeyboardHandler (interface)](KeyboardHandler.md)
* [KeyboardHandler (interface)](KeyboardHandler.md#keyboardhandler-interface)
* [OnPreKeyEvent](KeyboardHandler.md#onprekeyevent)
* [OnKeyEvent](KeyboardHandler.md#onkeyevent)
* [LifespanHandler (interface)](LifespanHandler.md)
* [LifespanHandler (interface)](LifespanHandler.md#lifespanhandler-interface)
* [OnBeforePopup](LifespanHandler.md#onbeforepopup)
* [_OnAfterCreated](LifespanHandler.md#_onaftercreated)
* [DoClose](LifespanHandler.md#doclose)
* [OnBeforeClose](LifespanHandler.md#onbeforeclose)
* [LoadHandler (interface)](LoadHandler.md)
* [LoadHandler (interface)](LoadHandler.md#loadhandler-interface)
* [OnLoadingStateChange](LoadHandler.md#onloadingstatechange)
* [OnLoadStart](LoadHandler.md#onloadstart)
* [OnDomReady](LoadHandler.md#ondomready)
* [OnLoadEnd](LoadHandler.md#onloadend)
* [OnLoadError](LoadHandler.md#onloaderror)
* [Network error](NetworkError.md)
* [Network error](NetworkError.md#network-error)
* [ERR_NONE](NetworkError.md#err_none)
* [ERR_ABORTED](NetworkError.md#err_aborted)
* [ERR_ACCESS_DENIED](NetworkError.md#err_access_denied)
Expand Down Expand Up @@ -333,10 +333,10 @@
* [ERR_UNKNOWN_URL_SCHEME](NetworkError.md#err_unknown_url_scheme)
* [ERR_UNSAFE_PORT](NetworkError.md#err_unsafe_port)
* [ERR_UNSAFE_REDIRECT](NetworkError.md#err_unsafe_redirect)
* [PaintBuffer (object)](PaintBuffer.md)
* [PaintBuffer (object)](PaintBuffer.md#paintbuffer-object)
* [GetIntPointer](PaintBuffer.md#getintpointer)
* [GetString](PaintBuffer.md#getstring)
* [RenderHandler (interface)](RenderHandler.md)
* [RenderHandler (interface)](RenderHandler.md#renderhandler-interface)
* [GetRootScreenRect](RenderHandler.md#getrootscreenrect)
* [GetViewRect](RenderHandler.md#getviewrect)
* [GetScreenRect](RenderHandler.md#getscreenrect)
Expand All @@ -348,7 +348,7 @@
* [OnScrollOffsetChanged](RenderHandler.md#onscrolloffsetchanged)
* [StartDragging](RenderHandler.md#startdragging)
* [UpdateDragCursor](RenderHandler.md#updatedragcursor)
* [Request (class)](Request.md)
* [Request (class)](Request.md#request-class)
* [CreateRequest](Request.md#createrequest)
* [IsReadOnly](Request.md#isreadonly)
* [GetUrl](Request.md#geturl)
Expand All @@ -367,7 +367,7 @@
* [SetFirstPartyForCookies](Request.md#setfirstpartyforcookies)
* [GetResourceType](Request.md#getresourcetype)
* [GetTransitionType](Request.md#gettransitiontype)
* [RequestHandler (interface)](RequestHandler.md)
* [RequestHandler (interface)](RequestHandler.md#requesthandler-interface)
* [OnBeforeBrowse](RequestHandler.md#onbeforebrowse)
* [OnBeforeResourceLoad](RequestHandler.md#onbeforeresourceload)
* [GetResourceHandler](RequestHandler.md#getresourcehandler)
Expand All @@ -381,14 +381,14 @@
* [_OnCertificateError](RequestHandler.md#_oncertificateerror)
* [OnRendererProcessTerminated](RequestHandler.md#onrendererprocessterminated)
* [OnPluginCrashed](RequestHandler.md#onplugincrashed)
* [ResourceHandler (interface)](ResourceHandler.md)
* [ResourceHandler (interface)](ResourceHandler.md#resourcehandler-interface)
* [ProcessRequest](ResourceHandler.md#processrequest)
* [GetResponseHeaders](ResourceHandler.md#getresponseheaders)
* [ReadResponse](ResourceHandler.md#readresponse)
* [CanGetCookie](ResourceHandler.md#cangetcookie)
* [CanSetCookie](ResourceHandler.md#cansetcookie)
* [Cancel](ResourceHandler.md#cancel)
* [Response (object)](Response.md)
* [Response (object)](Response.md#response-object)
* [IsReadOnly](Response.md#isreadonly)
* [GetStatus](Response.md#getstatus)
* [SetStatus](Response.md#setstatus)
Expand All @@ -401,35 +401,35 @@
* [GetHeaderMultimap](Response.md#getheadermultimap)
* [SetHeaderMap](Response.md#setheadermap)
* [SetHeaderMultimap](Response.md#setheadermultimap)
* [StringVisitor (interface)](StringVisitor.md)
* [StringVisitor (interface)](StringVisitor.md#stringvisitor-interface)
* [Visit](StringVisitor.md#visit)
* [V8ContextHandler (interface)](V8ContextHandler.md)
* [V8ContextHandler (interface)](V8ContextHandler.md#v8contexthandler-interface)
* [OnContextCreated](V8ContextHandler.md#oncontextcreated)
* [OnContextReleased](V8ContextHandler.md#oncontextreleased)
* [Virtual Key codes](VirtualKey.md)
* [WebPluginInfo (object)](WebPluginInfo.md)
* [Virtual Key codes](VirtualKey.md#virtual-key-codes)
* [WebPluginInfo (object)](WebPluginInfo.md#webplugininfo-object)
* [GetName](WebPluginInfo.md#getname)
* [GetPath](WebPluginInfo.md#getpath)
* [GetVersion](WebPluginInfo.md#getversion)
* [GetDescription](WebPluginInfo.md#getdescription)
* [WebRequest (class)](WebRequest.md)
* [WebRequest (class)](WebRequest.md#webrequest-class)
* [Create](WebRequest.md#create)
* [GetRequest](WebRequest.md#getrequest)
* [GetRequestStatus](WebRequest.md#getrequeststatus)
* [GetRequestError](WebRequest.md#getrequesterror)
* [GetResponse](WebRequest.md#getresponse)
* [Cancel](WebRequest.md#cancel)
* [WebRequestClient (interface)](WebRequestClient.md)
* [WebRequestClient (interface)](WebRequestClient.md#webrequestclient-interface)
* [OnUploadProgress](WebRequestClient.md#onuploadprogress)
* [OnDownloadProgress](WebRequestClient.md#ondownloadprogress)
* [OnDownloadData](WebRequestClient.md#ondownloaddata)
* [OnRequestComplete](WebRequestClient.md#onrequestcomplete)
* [WindowInfo (class)](WindowInfo.md)
* [WindowInfo (class)](WindowInfo.md#windowinfo-class)
* [SetAsChild](WindowInfo.md#setaschild)
* [SetAsPopup](WindowInfo.md#setaspopup)
* [SetAsOffscreen](WindowInfo.md#setasoffscreen)
* [SetTransparentPainting](WindowInfo.md#settransparentpainting)
* [WindowUtils (class)](WindowUtils.md)
* [WindowUtils (class)](WindowUtils.md#windowutils-class)
* [OnSetFocus ](WindowUtils.md#onsetfocus-win)
* [OnSize ](WindowUtils.md#onsize-win)
* [OnEraseBackground ](WindowUtils.md#onerasebackground-win)
Expand Down
3 changes: 3 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# API

API reference is available in the root [api/](../api) directory.
54 changes: 54 additions & 0 deletions docs/Knowledge-Base.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Table of contents:
* [How to capture Audio and Video in HTML5?](#how-to-capture-audio-and-video-in-html5)
* [Touch and multi-touch support](#touch-and-multi-touch-support)
* [Black or white browser screen](#black-or-white-browser-screen)
* [Python crashes with "Segmentation fault" - how to debug?](#python-crashes-with-segmentation-fault-how-to-debug)
* [Windows XP support](#windows-xp-support)
* [Mac 32-bit support](#mac-32-bit-support)
* [Security](#security)
Expand Down Expand Up @@ -164,6 +165,59 @@ appear even after disabling GPU hardware acceleration. This is normal
because GPU was disabled so WebGL cannot work.


## How to enable debug information in examples?

You can pass "--debug" command line flag to any of CEF Python
examples and unit tests. It will also work with your app, as
this feature is enabled in CEF Python's core. When this flag is
passed the following settings will be set:
```
settings = {"debug": True, "log_severity": cef.LOGSEVERITY_WARNING}
cef.Initialize(settings=settings)
```

Now you should see debug information displayed in console like this:
```
[CEF Python] Initialize() called
[CEF Python] CefExecuteProcess(): exitCode = -1
[CEF Python] CefInitialize()
[CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
[CEF Python] Command line string for the browser process: ...
```


## Python crashes with "Segmentation fault" - how to debug?

Install gdb:
- On Linux type: `sudo apt-get install gdb`
- On Mac type: `brew install gdb` and then [sign gdb]
(https://sourceware.org/gdb/wiki/BuildingOnDarwin#Giving_gdb_permission_to_control_other_processes)
- Additionally on Mac to get a meaningful stack trace with gdb do these steps:
- Install [macports](https://www.macports.org/install.php)
and restart terminal
- Type `sudo port install gdb-apple`
- Type `sudo codesign -s "gdb-cert" /opt/local/bin/gdb-apple`
- Type `/opt/local/bin/gdb-apple python`

Run python script using gdb:
```
gdb python
run tkinter_.py
```

On segmentation fault to display stack trace type:
```
bt
```

On Mac to use lldb:
```
lldb python
run tkinter_.py
bt
```


## Windows XP support

CEF Python v31.2 was the last version to support Windows XP. This is
Expand Down
Loading

0 comments on commit 23a6c62

Please sign in to comment.