Skip to content

Commit 00ee500

Browse files
committed
Merge branch '146-linux' into 146-macos
2 parents 378263a + 54d7443 commit 00ee500

32 files changed

Lines changed: 702 additions & 474 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ dist/
44
cefpython3/*.pyd
55
cefpython3/*.dll
66
cefpython3/*.exe
7+
cefpython3/*.so
8+
cefpython3/*.so.*
9+
cefpython3/subprocess
710
cefpython3/*.pak
811
cefpython3/*.dat
912
cefpython3/*.bin

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ You can also download packages for offline installation available on the [GitHub
5353

5454
Below is a table with supported platforms, python versions and architectures.
5555

56-
OS | Py2 | Py3 | 32bit | 64bit | Requirements
57-
--- | --- | --- | --- | --- | ---
58-
Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 | Yes | Yes | Windows 7+ (Note that Python 3.9 supports Windows 8.1+)
59-
Linux | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Debian 8+, Ubuntu 14.04+,<br> Fedora 24+, openSUSE 13.3+
60-
Mac | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | No | Yes | MacOS 10.9+
56+
OS | Python | 32bit | 64bit | Requirements
57+
--- | --- | --- | --- | ---
58+
Windows | 3.10 / 3.11 / 3.12 / 3.13 / 3.14 | No | Yes | Windows 10+
59+
Linux | 3.10 / 3.11 / 3.12 / 3.13 / 3.14 | No | Yes | Ubuntu 20.04+, Debian 11+
60+
Mac | 3.10 / 3.11 / 3.12 / 3.13 / 3.14 | No | Yes | macOS 10.15+
6161

6262

6363
## Examples

api/Browser.md

Lines changed: 34 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@ Table of contents:
3636
* [GetClientCallback](#getclientcallback)
3737
* [GetClientCallbacksDict](#getclientcallbacksdict)
3838
* [GetFocusedFrame](#getfocusedframe)
39-
* [GetFrame](#getframe)
4039
* [GetFrameByIdentifier](#getframebyidentifier)
41-
* [GetFrames](#getframes)
42-
* [GetFrameCount](#getframecount)
43-
* [GetFrameIdentifiers](#getframeidentifiers)
40+
* [GetFrameByName](#getframebyname)
4441
* [GetFrameNames](#getframenames)
42+
* [GetFrames](#getframes)
4543
* [GetImage](#getimage)
4644
* [GetJavascriptBindings](#getjavascriptbindings)
4745
* [GetMainFrame](#getmainframe)
48-
* [GetNSTextInputContext](#getnstextinputcontext)
4946
* [GetOpenerWindowHandle](#getopenerwindowhandle)
5047
* [GetOuterWindowHandle](#getouterwindowhandle)
5148
* [GetSetting](#getsetting)
@@ -56,13 +53,10 @@ Table of contents:
5653
* [GetZoomLevel](#getzoomlevel)
5754
* [GoBack](#goback)
5855
* [GoForward](#goforward)
59-
* [HandleKeyEventAfterTextInputClient](#handlekeyeventaftertextinputclient)
60-
* [HandleKeyEventBeforeTextInputClient](#handlekeyeventbeforetextinputclient)
6156
* [HasDevTools](#hasdevtools)
6257
* [HasDocument](#hasdocument)
6358
* [Invalidate](#invalidate)
6459
* [IsFullscreen](#isfullscreen)
65-
* [IsLoading](#isloading)
6660
* [IsPopup](#ispopup)
6761
* [IsWindowRenderingDisabled](#iswindowrenderingdisabled)
6862
* [LoadUrl](#loadurl)
@@ -107,6 +101,12 @@ Methods available in upstream CEF which were not yet exposed in CEF Python
107101
* ImeCommitText
108102
* ImeFinishComposingText
109103
* ImeCancelComposition
104+
* GetFrameCount
105+
* GetFrameIdentifiers
106+
* GetNSTextInputContext (Mac, OSR)
107+
* HandleKeyEventAfterTextInputClient (Mac, OSR)
108+
* HandleKeyEventBeforeTextInputClient (Mac, OSR)
109+
* IsLoading
110110

111111
There are some edge cases when after the OnBeforeClose event browser objects
112112
are no more globally referenced thus a new instance is created that
@@ -169,7 +169,7 @@ information.
169169

170170
| | |
171171
| --- | --- |
172-
| __Return__ | bool |
172+
| __Return__ | void |
173173

174174
Explicitly close the associated DevTools browser, if any.
175175

@@ -319,24 +319,17 @@ Calling javascript from native code synchronously is not possible in CEF 3. It i
319319

320320
| Parameter | Type |
321321
| --- | --- |
322-
| searchId | int |
323322
| searchText | string |
324323
| forward | bool |
325324
| matchCase | bool |
326325
| findNext | bool |
327326
| __Return__ | void |
328327

329-
Description from upstream CEF:
330-
331-
> Search for |searchText|. |identifier| must be a unique ID and these IDs
332-
> must strictly increase so that newer requests always have greater IDs than
333-
> older requests. If |identifier| is zero or less than the previous ID value
334-
> then it will be automatically assigned a new valid ID. |forward| indicates
335-
> whether to search forward or backward within the page. |matchCase|
336-
> indicates whether the search should be case-sensitive. |findNext| indicates
337-
> whether this is the first request or a follow-up. The CefFindHandler
338-
> instance, if any, returned via CefClient::GetFindHandler will be called to
339-
> report find results.
328+
Search for |searchText|. |forward| indicates whether to search forward or
329+
backward within the page. |matchCase| indicates whether the search should be
330+
case-sensitive. |findNext| indicates whether this is the first request or a
331+
follow-up. The CefFindHandler instance, if any, returned via
332+
CefClient::GetFindHandler will be called to report find results.
340333

341334
### GetClientCallback
342335

@@ -366,64 +359,46 @@ Get client callbacks as a dictionary.
366359
Returns the focused [Frame](Frame.md) for the browser window.
367360

368361

369-
### GetFrame
362+
### GetFrameByIdentifier
370363

371364
| Parameter | Type |
372365
| --- | --- |
373-
| name | string |
366+
| identifier | string |
374367
| __Return__ | Frame |
375368

376-
Returns the [Frame](Frame.md) with the specified name, or NULL if not found.
369+
Returns the [Frame](Frame.md) with the specified identifier, or None if not found.
377370

378371

379-
### GetFrameByIdentifier
372+
### GetFrameByName
380373

381374
| Parameter | Type |
382375
| --- | --- |
383-
| identifier | long |
376+
| name | string |
384377
| __Return__ | Frame |
385378

386-
Available only in CEF 3. Returns the [Frame](Frame.md) with the specified identifier, or None if not found.
387-
388-
389-
### GetFrames
390-
391-
| | |
392-
| --- | --- |
393-
| __Return__ | list |
394-
395-
Get all frames. This is an internal CEF Python implementation that uses GetFrameNames() and GetFrame() methods to list through all frames. The main frame is not included in that list.
379+
Returns the [Frame](Frame.md) with the specified name, or None if not found.
380+
This method should only be called on the UI thread.
396381

397382

398-
### GetFrameCount
383+
### GetFrameNames
399384

400385
| | |
401386
| --- | --- |
402-
| __Return__ | int |
403-
404-
Available only in CEF 3. Not yet implemented.
387+
| __Return__ | string[] |
405388

406-
Returns the number of frames that currently exist.
389+
Returns the names of all existing frames. This list does not include the main frame.
390+
This method should only be called on the UI thread.
407391

408392

409-
### GetFrameIdentifiers
393+
### GetFrames
410394

411395
| | |
412396
| --- | --- |
413-
| __Return__ | void |
414-
415-
Available only in CEF 3. Not yet implemented.
416-
417-
Returns the identifiers of all existing frames.
418-
419-
420-
### GetFrameNames
397+
| __Return__ | list |
421398

422-
| | |
423-
| --- | --- |
424-
| __Return__ | string[] |
425-
426-
Returns the names of all existing frames. This list does not include the main frame.
399+
Get all frames. This is a CEF Python helper that calls GetFrameNames() and
400+
GetFrameByName() to return a list of [Frame](Frame.md) objects. The main frame
401+
is not included in that list.
427402

428403

429404
### GetImage
@@ -467,18 +442,6 @@ Returns the [JavascriptBindings](JavascriptBindings.md) object that was passed t
467442
Returns the main (top-level) [Frame](Frame.md) for the browser window.
468443

469444

470-
### GetNSTextInputContext
471-
472-
| | |
473-
| --- | --- |
474-
| __Return__ | TextInputContext |
475-
476-
Not yet ported. Available only in CEF 3.
477-
478-
Get the NSTextInputContext implementation for enabling IME on Mac when
479-
window rendering is disabled.
480-
481-
482445
### GetOpenerWindowHandle
483446

484447
| | |
@@ -573,30 +536,6 @@ Navigate backwards.
573536
Navigate forwards.
574537

575538

576-
### HandleKeyEventAfterTextInputClient
577-
578-
| Parameter | Type |
579-
| --- | --- |
580-
| keyEvent | eventHandle |
581-
| __Return__ | void |
582-
583-
Available only in CEF 3. Not yet implemented.
584-
585-
Performs any additional actions after NSTextInputClient handles the event.
586-
587-
588-
### HandleKeyEventBeforeTextInputClient
589-
590-
| | |
591-
| --- | --- |
592-
| __Return__ | void |
593-
594-
Available only in CEF 3. Not yet implemented.
595-
596-
Handles a keyDown event prior to passing it through the NSTextInputClient
597-
machinery.
598-
599-
600539
### HasDevTools
601540

602541
| | |
@@ -636,24 +575,11 @@ Description from upstream CEF:
636575

637576
### IsFullscreen
638577

639-
| | |
640-
| --- | --- |
641-
| __Return__ | void |
642-
643-
Whether in fullscreen mode, see ToggleFullscreen().
644-
645-
This function is Windows-only.
646-
647-
648-
### IsLoading
649-
650578
| | |
651579
| --- | --- |
652580
| __Return__ | bool |
653581

654-
Available only in CEF 3. Not yet implemented.
655-
656-
Returns true if the browser is currently loading.
582+
Whether in fullscreen mode, see ToggleFullscreen(). Windows-only.
657583

658584

659585
### IsPopup
@@ -686,9 +612,8 @@ Load url in the main frame.
686612
If the url is a local path it needs to start with the `file://` prefix.
687613
If the url contains special characters it may need proper handling.
688614
Starting with v66.1+ it is required for the app code to encode the url
689-
properly. You can use the `pathlib.PurePath.as_uri` in Python 3
690-
or `urllib.pathname2url` in Python 2 (`urllib.request.pathname2url`
691-
in Python 3) depending on your case.
615+
properly. You can use `pathlib.PurePath.as_uri` or
616+
`urllib.request.pathname2url` depending on your case.
692617

693618

694619
### Navigate
@@ -781,7 +706,7 @@ this method will replace it with the specified |word|.
781706
| --- | --- |
782707
| enabled | bool |
783708
| min_size | list[width, height] |
784-
| max_size | list[width, heifght] |
709+
| max_size | list[width, height] |
785710
| __Return__ | void |
786711

787712
Description from upstream CEF:

api/Cookie.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Table of contents:
3131
* [GetHasExpires](#gethasexpires)
3232
* [SetExpires](#setexpires)
3333
* [GetExpires](#getexpires)
34+
* [SetSameSite](#setsamesite)
35+
* [GetSameSite](#getsamesite)
36+
* [SetPriority](#setpriority)
37+
* [GetPriority](#getpriority)
3438

3539

3640
## Methods
@@ -56,6 +60,8 @@ The cookie may have the following keys:
5660
- lastAccess (datetime.datetime)
5761
- hasExpires (bool)
5862
- expires (datetime.datetime)
63+
- sameSite (int)
64+
- priority (int)
5965

6066

6167
### Get
@@ -261,3 +267,48 @@ Set the cookie expiration date. You should also call SetHasExpires().
261267
| __Return__ | datetime.datetime |
262268

263269
Get the expires property.
270+
271+
272+
### SetSameSite
273+
274+
| Parameter | Type |
275+
| --- | --- |
276+
| sameSite | int |
277+
| __Return__ | void |
278+
279+
Set the cookie SameSite attribute. Use the `CEF_COOKIE_SAME_SITE_*` constants:
280+
- `CEF_COOKIE_SAME_SITE_UNSPECIFIED` (0)
281+
- `CEF_COOKIE_SAME_SITE_NO_RESTRICTION` (1)
282+
- `CEF_COOKIE_SAME_SITE_LAX_MODE` (2)
283+
- `CEF_COOKIE_SAME_SITE_STRICT_MODE` (3)
284+
285+
286+
### GetSameSite
287+
288+
| | |
289+
| --- | --- |
290+
| __Return__ | int |
291+
292+
Get the cookie SameSite attribute. See SetSameSite() for possible values.
293+
294+
295+
### SetPriority
296+
297+
| Parameter | Type |
298+
| --- | --- |
299+
| priority | int |
300+
| __Return__ | void |
301+
302+
Set the cookie priority. Use the `CEF_COOKIE_PRIORITY_*` constants:
303+
- `CEF_COOKIE_PRIORITY_LOW` (-1)
304+
- `CEF_COOKIE_PRIORITY_MEDIUM` (0)
305+
- `CEF_COOKIE_PRIORITY_HIGH` (1)
306+
307+
308+
### GetPriority
309+
310+
| | |
311+
| --- | --- |
312+
| __Return__ | int |
313+
314+
Get the cookie priority. See SetPriority() for possible values.

0 commit comments

Comments
 (0)