Changeset 945:90f458a3bc2d for src/mlx/gui/cef.py
- Timestamp:
- 04/30/19 14:49:39 (5 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/cef.py
r944 r945 14 14 import tempfile 15 15 import traceback 16 import ctypes 16 17 import urllib.request, urllib.error, urllib.parse 17 18 from lxml import etree … … 322 323 """Start a browser instance in the given container with the given URL.""" 323 324 if os.name=="nt": 324 window = container.get_window() 325 if window is None: 326 print("mlx.gui.cef.startInContainer: no window found!") 327 windowID = None 328 else: 329 windowID = window.handle 325 gdk.threads_enter() 326 ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p 327 ctypes.pythonapi.PyCapsule_GetPointer.argtypes = \ 328 [ctypes.py_object] 329 gpointer = ctypes.pythonapi.PyCapsule_GetPointer( 330 container.get_property("window").__gpointer__, None) 331 libgdk = ctypes.CDLL("libgdk-3-0.dll") 332 windowID = libgdk.gdk_win32_window_get_handle(gpointer) 333 container.windowID = windowID 334 gdk.threads_leave() 330 335 else: 331 336 container.set_visual(container.get_screen().lookup_visual(0x21)) … … 427 432 428 433 def _handleSizeAllocate(widget, sizeAlloc): 429 """Handle the size-allocate event.""" 430 window = widget.get_window() 434 """Handle the size-allocate event on Windows.""" 431 435 if widget is not None: 432 cefpython.WindowUtils.OnSize(wi ndow.handle, 0, 0, 0)436 cefpython.WindowUtils.OnSize(widget.windowID, 0, 0, 0)
Note:
See TracChangeset
for help on using the changeset viewer.