Skip to content

Commit 054a2ab

Browse files
committed
CEF Python 53.1 Beta release for Linux and Python 2.7 / 3.4 / 3.5.
Update to Chrome 53.0.2785.101 / CEF 3.2785.1481.gc3a7e2c. Add drag-image representation of d&d in OSR Kivy (cztomczak#251). Create a patch for CEF to expose drag-image representation in CefDragData. Make a clean shutdown of CEF in Kivy example. Add a call to CloseBrowser() in App.on_stop(). Add DragData.GetImage() and HasImage() methods, see API docs. Add Image object and its methods to get image either as bitmap or png, see API docs. Fix issue during Shutdown in cefpython internals ("dictionary changed size during iteration" error). Fix issue with invalid path to "locales_dir_path" on Python 3. Fix automate.py. Fix --no-cef-update flag in automate.py. Fix issues with --force-chromium-update. Fix fetching CEF commit from src/version/. Print error message when automate.py is run on Python != 2.7. Remove setup.cfg from Linux installer, this is a remaining from Windows installer. On Linux no wheels are created. Include the hello_world.py example in setup installer.
1 parent 221b42f commit 054a2ab

25 files changed

+742
-137
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
22
build/
33
*.log
4-
__pycache__/
4+
__pycache__/
5+
*.pyc

api/API-categories.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [DpiAware](DpiAware.md) class (Win)
2525
* [DragData](DragData.md) object
2626
* [Frame](Frame.md) object
27+
* [Image](Image.md) object
2728
* [JavascriptBindings](JavascriptBindings.md) class
2829
* [JavascriptCallback](JavascriptCallback.md) object
2930
* [PaintBuffer](PaintBuffer.md) object

api/API-index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
* [OnKeyEvent](KeyboardHandler.md#onkeyevent)
4646
* [StringVisitor (interface)](StringVisitor.md)
4747
* [Visit](StringVisitor.md#visit)
48+
* [Frame (object)](Image.md)
49+
* [GetAsBitmap](Image.md#getasbitmap)
50+
* [GetAsPng](Image.md#getaspng)
51+
* [GetHeight](Image.md#getheight)
52+
* [GetWidth](Image.md#getwidth)
4853
* [JavascriptDialogHandler (interface)](JavascriptDialogHandler.md)
4954
* [Continue](JavascriptDialogHandler.md#continue)
5055
* [OnJavascriptDialog](JavascriptDialogHandler.md#onjavascriptdialog)
@@ -116,6 +121,8 @@
116121
* [GetLinkTitle](DragData.md#getlinktitle)
117122
* [GetFragmentText](DragData.md#getfragmenttext)
118123
* [GetFragmentHtml](DragData.md#getfragmenthtml)
124+
* [GetImage](DragData.md#getimage)
125+
* [HasImage](DragData.md#hasimage)
119126
* [LifespanHandler (interface)](LifespanHandler.md)
120127
* [OnBeforePopup](LifespanHandler.md#onbeforepopup)
121128
* [_OnAfterCreated](LifespanHandler.md#_onaftercreated)
@@ -182,8 +189,11 @@
182189
* [Undo](Frame.md#undo)
183190
* [ViewSource](Frame.md#viewsource)
184191
* [cefpython](cefpython.md)
192+
* [CreateBrowser](cefpython.md#createbrowser)
185193
* [CreateBrowserSync](cefpython.md#createbrowsersync)
194+
* [ExceptHook](cefpython.md#excepthook)
186195
* [GetAppSetting](cefpython.md#getappsetting)
196+
* [GetAppPath](cefpython.md#getapppath)
187197
* [GetBrowserByWindowHandle](cefpython.md#getbrowserbywindowhandle)
188198
* [GetCommandLineSwitch](cefpython.md#getcommandlineswitch)
189199
* [GetGlobalClientCallback](cefpython.md#getglobalclientcallback)

api/DragData.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[API categories](API-categories.md) | [API index](API-index.md)
22

3+
34
# DragData (object)
45

56

@@ -70,3 +71,22 @@ Return the plain text fragment that is being dragged.
7071

7172
Return the text/html fragment that is being dragged.
7273

74+
75+
### GetImage
76+
77+
| | |
78+
| --- | --- |
79+
| __Return__ | [Image](Image.md) |
80+
81+
Get image representation of drag data. Check with HasImage() first,
82+
otherwise if there is no image an exception is thrown.
83+
84+
85+
### HasImage
86+
87+
| | |
88+
| --- | --- |
89+
| __Return__ | bool |
90+
91+
Whether image representation of drag data is available.
92+

api/Image.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[API categories](API-categories.md) | [API index](API-index.md)
2+
3+
4+
# Frame (object)
5+
6+
7+
Table of contents:
8+
* [Methods](#methods)
9+
* [GetAsBitmap](#getasbitmap)
10+
* [GetAsPng](#getaspng)
11+
* [GetHeight](#getheight)
12+
* [GetWidth](#getwidth)
13+
14+
15+
## Methods
16+
17+
18+
### GetAsBitmap
19+
20+
| Parameter | Type |
21+
| --- | --- |
22+
| scale_factor | float |
23+
| color_type | cef_color_type_t |
24+
| alpha_type | cef_alpha_type_t |
25+
| __Return__ | bytes |
26+
27+
`cef_color_type_t` constants in the cefpython module:
28+
> CEF_COLOR_TYPE_RGBA_8888,
29+
> CEF_COLOR_TYPE_BGRA_8888,
30+
31+
`enum cef_alpha_type_t` constants in the cefpython module:
32+
> CEF_ALPHA_TYPE_OPAQUE,
33+
> CEF_ALPHA_TYPE_PREMULTIPLIED,
34+
> CEF_ALPHA_TYPE_POSTMULTIPLIED,
35+
36+
37+
### GetAsPng
38+
39+
| Parameter | Type |
40+
| --- | --- |
41+
| scale_factor | float |
42+
| with_transparency | bool |
43+
| __Return__ | bytes |
44+
45+
Returns image data as bytes.
46+
47+
Description from upstream CEF:
48+
> Returns the PNG representation that most closely matches |scale_factor|. If
49+
> |with_transparency| is true any alpha transparency in the image will be
50+
> represented in the resulting PNG data. |pixel_width| and |pixel_height| are
51+
> the output representation size in pixel coordinates. Returns a
52+
> CefBinaryValue containing the PNG image data on success or NULL on failure.
53+
54+
55+
### GetHeight
56+
57+
| | |
58+
| --- | --- |
59+
| __Return__ | int |
60+
61+
Returns the image heifght in density independent pixel (DIP) units.
62+
63+
64+
### GetWidth
65+
66+
| | |
67+
| --- | --- |
68+
| __Return__ | int |
69+
70+
Returns the image width in density independent pixel (DIP) units.
71+

docs/Build-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ binaries from GH releases.
5858
8) Build cefpython:
5959
```
6060
cd cefpython/src/linux/
61-
python compile.py 53.0
61+
python compile.py 53.1
6262
```
6363

6464
9) As of writing only "pygtk_.py" and "kivy_.py" examples are working

0 commit comments

Comments
 (0)