Skip to content

Commit 850ac55

Browse files
committed
Tutorial is almost complete (cztomczak#256)
Detect invalid arguments passed to cef.Initialize and cef.CreateBrowserSync.
1 parent 9853a1e commit 850ac55

File tree

12 files changed

+574
-164
lines changed

12 files changed

+574
-164
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ build/
44
__pycache__/
55
*.pyc
66
cefclient
7+
webcache/

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ also download packages for offline installation available on the
4545
pip install cefpython3==56.1
4646
```
4747

48+
## Tutorial
49+
50+
See the [Tutorial.md](docs/Tutorial.md) file.
51+
52+
4853
## Examples
4954

5055
See the [Examples-README.md](examples/Examples-README.md) file.
@@ -53,8 +58,15 @@ See the [Examples-README.md](examples/Examples-README.md) file.
5358
## Support
5459

5560
- Ask questions, report problems and issues on the [Forum](https://groups.google.com/group/cefpython)
56-
- Documentation is in the [docs/](docs) directory
57-
- API reference is in the [api/](api) directory
61+
- Supported examples are listed in the [Examples-README.md](examples/Examples-README.md) file
62+
- Documentation is in the [docs/](docs) directory:
63+
- [Build instructions](docs/Build-instructions.md)
64+
- [Knowledge base](docs/Knowledge-Base.md)
65+
- [Migration guide](docs/Migration-guide.md)
66+
- [Tutorial](docs/Tutorial.md)
67+
- API reference is in the [api/](api) directory:
68+
- [API categories](api/API-categories.md#api-categories)
69+
- [API index](api/API-index.md#api-index)
5870
- Additional documentation is in issues labelled [Knowledge Base](../../issues?q=is%3Aissue+is%3Aopen+label%3A%22Knowledge+Base%22)
5971
- To search documentation use GitHub "This repository" search
6072
at the top. To narrow results to documentation only select

api/API-categories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* [WindowUtils](WindowUtils.md#windowutils-class) class
3737

3838

39-
### Handlers (interfaces)
39+
### Client handlers (interfaces)
4040

4141
* [DisplayHandler](DisplayHandler.md#displayhandler-interface)
4242
* [DownloadHandler](DownloadHandler.md#downloadhandler)

api/ApplicationSettings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ default User-Agent string will be used. Also configurable using the
447447
(string)
448448
The location where user data such as spell checking dictionary files will
449449
be stored on disk. If empty then the default platform-specific user data
450-
directory will be used ("~/.cef_user_data" directory on Linux,
451-
"~/Library/Application Support/CEF/User Data" directory on Mac OS X,
452-
"Local Settings\Application Data\CEF\User Data" directory under the user
450+
directory will be used (`"~/.cef_user_data"` directory on Linux,
451+
`"~/Library/Application Support/CEF/User Data"` directory on Mac OS X,
452+
`"Local Settings\Application Data\CEF\User Data"` directory under the user
453453
profile directory on Windows).
454454

455455

api/JavascriptBindings.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ In CEF 3 communication between javascript and python can only be asynchronous. I
2929
There are plans to support binding data by reference (a list, dict or object's properties). This would be possible with the use of CefRegisterExtension().
3030

3131

32-
## Example usage
33-
34-
See the [wxpython.py](../src/windows/binaries_32bit/wxpython.py) example for an example usage of javascript bindings, javascript callbacks and python callbacks.
35-
36-
37-
3832
## Methods
3933

4034

api/cefpython.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,25 @@ All parameters are optional.
5555

5656
This function can only be called on the UI thread.
5757

58-
The "window_title" parameter will be used only
59-
when parent window provided in window_info was set to 0.
58+
The "window_title" parameter will be used only when parent
59+
window provided in window_info was set to 0. This is for use
60+
with hello_world.py and tutorial.py examples which don't use
61+
any third party GUI framework for creation of top-level window.
6062

6163
After the call to CreateBrowserSync() the page is not yet loaded,
62-
if you want your next lines of code to do some stuff on the webpage
63-
you will have to implement LoadHandler.[OnLoadEnd]((LoadHandler.md#onloadend))
64+
if you want your next lines of code to do some stuff on the
65+
webpage you will have to implement LoadHandler.[OnLoadingStateChange]((LoadHandler.md#onloadingstatechange))
6466
callback.
6567

6668

6769
### ExceptHook
6870

6971
| Parameter | Type |
7072
| --- | --- |
71-
| excType | - |
72-
| excValue | - |
73-
| traceObject | - |
74-
| __Return__ | string |
73+
| exc_type | - |
74+
| exc_value | - |
75+
| exc_trace | - |
76+
| __Return__ | void |
7577

7678
Global except hook to exit app cleanly on error. CEF has a multiprocess
7779
architecture and when exiting you need to close all processes (main Browser
@@ -99,6 +101,7 @@ to Initialize(). Returns None if key is not found.
99101

100102
| | |
101103
| --- | --- |
104+
| file_ (optional) | string |
102105
| __Return__ | string |
103106

104107
Get path to where application resides.
@@ -181,18 +184,7 @@ Returns true if called on the specified thread.
181184

182185
CEF maintains multiple internal threads that are used for handling different types of tasks. The UI thread creates the browser window and is used for all interaction with the webkit rendering engine and V8 Javascript engine. The UI thread will be the same as the main application thread if CefInitialize() is called with an [ApplicationSettings](ApplicationSettings.md) 'multi_threaded_message_loop' option set to false. The IO thread is used for handling schema and network requests. The FILE thread is used for the application cache and other miscellaneous activities.
183186

184-
List of threads in the Browser process. These are constants defined in the cefpython module:
185-
186-
* TID_UI: The main thread in the browser. This will be the same as the main application thread if cefpython.Initialize() is called with a ApplicationSettings.multi_threaded_message_loop value of false.
187-
* TID_DB: Used to interact with the database.
188-
* TID_FILE: Used to interact with the file system.
189-
* TID_FILE_USER_BLOCKING: Used for file system operations that block user interactions. Responsiveness of this thread affects users.
190-
* TID_PROCESS_LAUNCHER: Used to launch and terminate browser processes.
191-
* TID_CACHE: Used to handle slow HTTP cache operations.
192-
* TID_IO: Used to process IPC and network messages.
193-
194-
List of threads in the Renderer process:
195-
* TID_RENDERER: The main thread in the renderer. Used for all webkit and V8 interaction.
187+
See PostTask() for a list of threads.
196188

197189

198190
### MessageLoop
@@ -244,10 +236,23 @@ Description from upstream CEF:
244236
| ... | *args |
245237
| __Return__ | void |
246238

247-
Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously. Only Browser process threads are allowed, see IsThread() for a list of available threads and their descriptions.
239+
Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously. Only Browser process threads are allowed.
248240

249241
An example usage is in the wxpython.py example on Windows, in implementation of LifespanHandler.OnBeforePopup().
250242

243+
List of threads in the Browser process:
244+
* cef.TID_UI: The main thread in the browser. This will be the same as the main application thread if cefpython.Initialize() is called with a ApplicationSettings.multi_threaded_message_loop value of false.
245+
* cef.TID_DB: Used to interact with the database.
246+
* cef.TID_FILE: Used to interact with the file system.
247+
* cef.TID_FILE_USER_BLOCKING: Used for file system operations that block user interactions. Responsiveness of this thread affects users.
248+
* cef.TID_PROCESS_LAUNCHER: Used to launch and terminate browser processes.
249+
* cef.TID_CACHE: Used to handle slow HTTP cache operations.
250+
* cef.TID_IO: Used to process IPC and network messages.
251+
252+
List of threads in the Renderer process:
253+
* cef.TID_RENDERER: The main thread in the renderer. Used for all webkit and V8 interaction.
254+
255+
251256

252257
### QuitMessageLoop
253258

0 commit comments

Comments
 (0)