All methods of this class are static. Many of the Windows-only functions here are utilized in the PyWin32 example.
Table of contents:
| Parameter | Type |
|---|---|
| windowHandle | int |
| msg | long |
| wparam | long |
| lparam | long |
| Return | void |
Windows-only. This method processes WM_SETFOCUS message which is sent to a window after it has gained the keyboard focus.
| Parameter | Type |
|---|---|
| windowHandle | int |
| msg | long |
| wparam | long |
| lparam | long |
| Return | void |
Windows-only. This method processes WM_SIZE message which is sent to a window after its size has changed.
| Parameter | Type |
|---|---|
| windowHandle | int |
| msg | long |
| wparam | long |
| lparam | long |
| Return | void |
Windows-only. This method processes WM_ERASEBKGND message which is sent when the window background must be erased (for example, when a window is resized).
| Parameter | Type |
|---|---|
| browser | Browser |
| title | str |
| Return | void |
Windows-only. Set the title for the main window or popup window. The default implementation of DisplayHandler.OnTitleChange() calls this method to set the title for a window.
| Parameter | Type |
|---|---|
| browser | Browser |
| icon="inherit" | string |
| Return | void |
Windows-only. Set the icon for the popup window. The default implementation of DisplayHandler.OnTitleChange() calls this method to set the icon for a window that wasn't created explicitily (for example a popup window), the icon is inherited from the parent window. Icon parameter accepts only "inherit", you cannot pass here a path to an icon (currently not implemented).
| Parameter | Type |
|---|---|
| windowHandle | int |
| Return | void |
Get a parent handle.
On Linux and Mac this method always returns 0. @TODO.
| Parameter | Type |
|---|---|
| windowHandle | int |
| Return | void |
Check whether this is a valid window handle.
On Linux and Mac this method always returns True. @TODO.
| Parameter | Type |
|---|---|
| long GdkNativeWindow | long |
| Return | void |
Linux-only.
| Parameter | Type |
|---|---|
| long GtkWidget* | long |
| Return | void |
Linux-only.
| Return | void |
Linux-only. Install xlib error handlers so that the application won't be terminated on non-fatal errors. Must be done after initializing GTK.
CEF Python calls this function automatically during a call to Initialize, so there is no more need to call it manually in most cases.
| Parameter | Type |
|---|---|
| screen_number | int |
| Return | int |
Linux-only. Returns the ID of the X server's default visual for the given X screen, or 0 on failure. Must be called on the UI thread after cefpython.Initialize().
With GTK 3 the browser may stay blank unless the window it is embedded into uses this visual (Issue #701, CEF issue #3564). Set it before the window is realized, as the gtk3.py example does:
screen = window.get_screen()
window.set_visual(GdkX11.X11Screen.lookup_visual(
screen, cef.WindowUtils.GetX11DefaultVisualId(
screen.get_screen_number())))For toolkits that have no API to set the visual, see SetX11DefaultVisualForGtkWidget().
| Parameter | Type |
|---|---|
| gtkWidgetPtr | int |
| Return | bool |
Linux-only. Puts a GTK 3 widget on the X server's default visual, see
GetX11DefaultVisualId(). Returns False on failure. Call it on the UI
thread after cefpython.Initialize() and before the widget
is realized. It is meant for toolkits that have no API to set the visual,
e.g. the wxpython.py example passes int(frame.GetGtkWidget()).