Skip to content

Commit

Permalink
CEF Python 53.1 Beta release for Linux and Python 2.7 / 3.4 / 3.5.
Browse files Browse the repository at this point in the history
Update to Chrome 53.0.2785.101 / CEF 3.2785.1481.gc3a7e2c.

Add drag-image representation of d&d in OSR Kivy (#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.
  • Loading branch information
cztomczak committed Sep 20, 2016
1 parent 221b42f commit 054a2ab
Show file tree
Hide file tree
Showing 25 changed files with 742 additions and 137 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
build/
*.log
__pycache__/
__pycache__/
*.pyc
1 change: 1 addition & 0 deletions api/API-categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* [DpiAware](DpiAware.md) class (Win)
* [DragData](DragData.md) object
* [Frame](Frame.md) object
* [Image](Image.md) object
* [JavascriptBindings](JavascriptBindings.md) class
* [JavascriptCallback](JavascriptCallback.md) object
* [PaintBuffer](PaintBuffer.md) object
Expand Down
10 changes: 10 additions & 0 deletions api/API-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
* [OnKeyEvent](KeyboardHandler.md#onkeyevent)
* [StringVisitor (interface)](StringVisitor.md)
* [Visit](StringVisitor.md#visit)
* [Frame (object)](Image.md)
* [GetAsBitmap](Image.md#getasbitmap)
* [GetAsPng](Image.md#getaspng)
* [GetHeight](Image.md#getheight)
* [GetWidth](Image.md#getwidth)
* [JavascriptDialogHandler (interface)](JavascriptDialogHandler.md)
* [Continue](JavascriptDialogHandler.md#continue)
* [OnJavascriptDialog](JavascriptDialogHandler.md#onjavascriptdialog)
Expand Down Expand Up @@ -116,6 +121,8 @@
* [GetLinkTitle](DragData.md#getlinktitle)
* [GetFragmentText](DragData.md#getfragmenttext)
* [GetFragmentHtml](DragData.md#getfragmenthtml)
* [GetImage](DragData.md#getimage)
* [HasImage](DragData.md#hasimage)
* [LifespanHandler (interface)](LifespanHandler.md)
* [OnBeforePopup](LifespanHandler.md#onbeforepopup)
* [_OnAfterCreated](LifespanHandler.md#_onaftercreated)
Expand Down Expand Up @@ -182,8 +189,11 @@
* [Undo](Frame.md#undo)
* [ViewSource](Frame.md#viewsource)
* [cefpython](cefpython.md)
* [CreateBrowser](cefpython.md#createbrowser)
* [CreateBrowserSync](cefpython.md#createbrowsersync)
* [ExceptHook](cefpython.md#excepthook)
* [GetAppSetting](cefpython.md#getappsetting)
* [GetAppPath](cefpython.md#getapppath)
* [GetBrowserByWindowHandle](cefpython.md#getbrowserbywindowhandle)
* [GetCommandLineSwitch](cefpython.md#getcommandlineswitch)
* [GetGlobalClientCallback](cefpython.md#getglobalclientcallback)
Expand Down
20 changes: 20 additions & 0 deletions api/DragData.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[API categories](API-categories.md) | [API index](API-index.md)


# DragData (object)


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

Return the text/html fragment that is being dragged.


### GetImage

| | |
| --- | --- |
| __Return__ | [Image](Image.md) |

Get image representation of drag data. Check with HasImage() first,
otherwise if there is no image an exception is thrown.


### HasImage

| | |
| --- | --- |
| __Return__ | bool |

Whether image representation of drag data is available.

71 changes: 71 additions & 0 deletions api/Image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[API categories](API-categories.md) | [API index](API-index.md)


# Frame (object)


Table of contents:
* [Methods](#methods)
* [GetAsBitmap](#getasbitmap)
* [GetAsPng](#getaspng)
* [GetHeight](#getheight)
* [GetWidth](#getwidth)


## Methods


### GetAsBitmap

| Parameter | Type |
| --- | --- |
| scale_factor | float |
| color_type | cef_color_type_t |
| alpha_type | cef_alpha_type_t |
| __Return__ | bytes |

`cef_color_type_t` constants in the cefpython module:
> CEF_COLOR_TYPE_RGBA_8888,
> CEF_COLOR_TYPE_BGRA_8888,
`enum cef_alpha_type_t` constants in the cefpython module:
> CEF_ALPHA_TYPE_OPAQUE,
> CEF_ALPHA_TYPE_PREMULTIPLIED,
> CEF_ALPHA_TYPE_POSTMULTIPLIED,

### GetAsPng

| Parameter | Type |
| --- | --- |
| scale_factor | float |
| with_transparency | bool |
| __Return__ | bytes |

Returns image data as bytes.

Description from upstream CEF:
> Returns the PNG representation that most closely matches |scale_factor|. If
> |with_transparency| is true any alpha transparency in the image will be
> represented in the resulting PNG data. |pixel_width| and |pixel_height| are
> the output representation size in pixel coordinates. Returns a
> CefBinaryValue containing the PNG image data on success or NULL on failure.

### GetHeight

| | |
| --- | --- |
| __Return__ | int |

Returns the image heifght in density independent pixel (DIP) units.


### GetWidth

| | |
| --- | --- |
| __Return__ | int |

Returns the image width in density independent pixel (DIP) units.

2 changes: 1 addition & 1 deletion docs/Build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ binaries from GH releases.
8) Build cefpython:
```
cd cefpython/src/linux/
python compile.py 53.0
python compile.py 53.1
```

9) As of writing only "pygtk_.py" and "kivy_.py" examples are working
Expand Down
Loading

0 comments on commit 054a2ab

Please sign in to comment.